Old 10-21-2016, 09:42 AM   #1
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
Default ISimpleMediaDecoder question

I'm trying to handle a file type which encapsulates four separate stereo loops which may have different lengths. I don't think I can do it with ISimpleMediaDecoder because in a call to GetLength() I'd have to report different values for different channels and I can't see any way to do so.

Any idea how I could tackle this?
IXix is offline   Reply With Quote
Old 10-21-2016, 09:47 AM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Subclassing PCM_source is the most flexible way to do things and pretty much involves just a bit more typing of code than ISimpleMediaDecoder.

However, I am not completely sure what you are asking about...? Can you explain a bit more in detail what you are trying to do? (Reaper doesn't have the concept of different media lengths for different channels of a single media file, to begin with...And does a "length" even make sense for a looped media source?)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 10-21-2016, 12:41 PM   #3
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
Default

The Kaossilator Pro has four loop slots which can be set to different lengths. You can save them individually and I've implemented importing those to REAPER but you can also save the whole device state to a single file which is much quicker and more convenient. I'm hoping to be able to get that file into REAPER and treat it as multichannel audio which could either be exploded onto separate tracks or just looped as a single item.

As a single item I could just report the length of the longest loop as the length of the media (or maybe a point where the loop ends converge) but if it were exploded that wouldn't cut it, the item loop point would be wrong for any shorter loops.

It might just be too weird to do but in REAPER there's almost always a way. I'm not familiar enough with what can and can't be done with the API to know whether what I'm attempting is possible or not.
IXix is offline   Reply With Quote
Old 10-22-2016, 06:10 AM   #4
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
Default

Can you create an item with multiple takes with the API? Since takes can be different lengths that might make more sense although the takes would have to point to different sections of the same file. Is that possible?
IXix is offline   Reply With Quote
Old 10-22-2016, 07:45 AM   #5
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by IXix View Post
Can you create an item with multiple takes with the API? Since takes can be different lengths that might make more sense although the takes would have to point to different sections of the same file. Is that possible?
It's possible to create items with multiple takes, but it might get quite tricky if you need to somehow do that from your media decoder/PCM_source code...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 10-22-2016, 08:01 AM   #6
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
Default

Quote:
Originally Posted by Xenakios View Post
It's possible to create items with multiple takes, but it might get quite tricky if you need to somehow do that from your media decoder/PCM_source code...
Yeah, I think you're right. Hmmm....
IXix is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:03 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.