Lorenz Minder | 4 Aug 08:58 2011
Picon
Picon

What is the purpose of AUDIO_IO_DEVICE::io_mode == io_readwrite?

Hi,

I have a question regarding the io_mode for an audio device:  What is
the purpose of the io_readwrite mode?  I was assuming that devices
supporting that mode can then be opened in full duplex mode, if they are
used as both input and output.  This would presumably make it easier
(possible?) to synchronize the input stream with the output stream.
However, if it's implemented, and I do

  ./ecasound -i mydevice -o mydevice

ecasound will open two instances of that device, and open the output
device with the io_readwrite mode (the input will be opened as io_read).
It will, however, never attempt to read from that device.  If
io_readwrite support is disabled, it will open the output device in
io_write mode, but I didn't notice any other difference in behavior.

So what is the purpose if io_readwrite in that context, and how is a
device supposed to handle that?

Best,
--Lorenz

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
(Continue reading)

Kai Vehmanen | 4 Aug 15:55 2011

Re: What is the purpose of AUDIO_IO_DEVICE::io_mode == io_readwrite?

Hi,

On Wed, 3 Aug 2011, Lorenz Minder wrote:

> Hi,
>
> I have a question regarding the io_mode for an audio device:  What is
> the purpose of the io_readwrite mode?  I was assuming that devices

it's analogous to "w+" mode of fopen. Quoting fopen man page:
""w+: Open for reading and writing.  The file is created if it does not 
exist, otherwise it is truncated.  The stream is positioned at the 
beginning'of the file.""

Simiarly io_write is similar to "w" mode, i.e. the output is always 
truncated.

> So what is the purpose if io_readwrite in that context, and how is a
> device supposed to handle that?

The main use case for io_readwrite is the ability to open file outputs in 
update mode (e.g. to replace only portions of a recording, or continue 
recording at the end of an existing file).

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
(Continue reading)

Mark Armendariz | 5 Aug 03:30 2011

Confusion about Fading Amplification

* Note: I assume attachments are not kosher on this list, so I posted
this question on StackOverflow as so you can see my resulting
waveforms:
http://stackoverflow.com/questions/6950482/how-do-multiple-amplitude-fades-work-on-ecasound

-----

I want to fade a track in and out as specific time codes.  For
example, I would like to take an audio file, and:

Start it at 100% Volume,
Fade it to 20%  at 2 seconds
Fade it to 100% at 4 seconds
Fade it to 20%  at 6 seconds
Fade it to 100% at 8 seconds
Fade it to 20%  at 10 seconds
Fade it to 100% at 12 seconds
Fade it to 0 at 14 seconds.

I've been testing this with a constant tone generated by ecasound so
that I can open the resulting file in Audacity and see the results
visually.  As far as I can tell, increasing the amplitude is relative,
while decreasing it is not.  It seems that if I fade the amplitude up
that it affects the volume of the whole track and not just at the
specific time I set the fade, which is where I'm getting lost.

Note: I seem to have figured out the "why" as I was coming up with
examples, but I'm still hoping you can explain if this is correct or
if there is a "better" way.

(Continue reading)

Joel Roth | 5 Aug 07:34 2011
Picon

Re: Confusion about Fading Amplification

On Thu, Aug 04, 2011 at 09:30:32PM -0400, Mark Armendariz wrote:
> * Note: I assume attachments are not kosher on this list, so I posted
> this question on StackOverflow as so you can see my resulting
> waveforms:
> http://stackoverflow.com/questions/6950482/how-do-multiple-amplitude-fades-work-on-ecasound
> 
> -----
> 
> I want to fade a track in and out as specific time codes.  For
> example, I would like to take an audio file, and:
> 
> Start it at 100% Volume,
> Fade it to 20%  at 2 seconds
> Fade it to 100% at 4 seconds
> Fade it to 20%  at 6 seconds
> Fade it to 100% at 8 seconds
> Fade it to 20%  at 10 seconds
> Fade it to 100% at 12 seconds
> Fade it to 0 at 14 seconds.

I see you've been using multiple -kl2 and -ea operators.

While that may be possible, you may find it simpler
to create a single envelope using -klg. For the above example (not
tested) you could try this:

ecasound -a:1 -i:tone.wav -ea:100 \
-klg:1,0,100,7,1,2,0.20,4,1,6,0.20,8,1,10,0.20,12,1,14,0 \
-o:test.mp3

(Continue reading)

Mark Armendariz | 5 Aug 08:46 2011

Re: Confusion about Fading Amplification

On Fri, Aug 5, 2011 at 1:34 AM, Joel Roth <joelz <at> pobox.com> wrote:
> On Thu, Aug 04, 2011 at 09:30:32PM -0400, Mark Armendariz wrote:
>> * Note: I assume attachments are not kosher on this list, so I posted
>> this question on StackOverflow as so you can see my resulting
>> waveforms:
>> http://stackoverflow.com/questions/6950482/how-do-multiple-amplitude-fades-work-on-ecasound
>>
>> -----
>>
>> I want to fade a track in and out as specific time codes.  For
>> example, I would like to take an audio file, and:
>>
>> Start it at 100% Volume,
>> Fade it to 20%  at 2 seconds
>> Fade it to 100% at 4 seconds
>> Fade it to 20%  at 6 seconds
>> Fade it to 100% at 8 seconds
>> Fade it to 20%  at 10 seconds
>> Fade it to 100% at 12 seconds
>> Fade it to 0 at 14 seconds.
>
>
> I see you've been using multiple -kl2 and -ea operators.
>
> While that may be possible, you may find it simpler
> to create a single envelope using -klg. For the above example (not
> tested) you could try this:
>
> ecasound -a:1 -i:tone.wav -ea:100 \
> -klg:1,0,100,7,1,2,0.20,4,1,6,0.20,8,1,10,0.20,12,1,14,0 \
(Continue reading)

Lorenz Minder | 5 Aug 08:54 2011
Picon
Picon

Re: What is the purpose of AUDIO_IO_DEVICE::io_mode == io_readwrite?

Hi Kai,

Thanks for your explanations, they are very much appreciated!  The
message I take home from this is that is that devices (unlike file
backends) ought to not implement io_readwrite, since there is no proper
analogy.

As a note aside, "r+" (with creation of a new file if no such already
exists) would be the better analogy below, since "w+" discards the
contents of the previous file, which apppears not to be what is intended
here.  

Best,
--Lorenz

Kai Vehmanen wrote:
> >I have a question regarding the io_mode for an audio device:  What is
> >the purpose of the io_readwrite mode?  I was assuming that devices
> 
> it's analogous to "w+" mode of fopen. Quoting fopen man page:
> ""w+: Open for reading and writing.  The file is created if it does
> not exist, otherwise it is truncated.  The stream is positioned at
> the beginning'of the file.""
> 
> Simiarly io_write is similar to "w" mode, i.e. the output is always
> truncated.
> 
> >So what is the purpose if io_readwrite in that context, and how is a
> >device supposed to handle that?
> 
(Continue reading)

Jeremy Salwen | 10 Aug 11:02 2011
Picon

LV2 Plugin Support

Hi All,

LV2 plugin support is coming along nicely, and I'm getting to the point that I can start to ask insignificant questions like "what should the identifier for LV2 plugins be?"  I'm referring of course to the string that is "el" in the case of ladspa plugins, i.e. a plugin might be identified as

"el:sine_fcac". What prefix should an LV2 plugin be identified with?

Jeremy
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Ecasound-list mailing list
Ecasound-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Julien Claassen | 10 Aug 16:02 2011
Picon

Re: LV2 Plugin Support

Hi Jeremy!
   first of all thanks for the persistent work on this. It's appreciated!
   Then to the matter at hand: What do youmean: Do you mean the option, that 
should be used or the identifying name? In a LADSPA plugin you have the label, 
the name. I haven't really looked at LV2 plugins yet, but if there is a label, 
that would be the best thing, since it seems the shortest for the LADSPA 
plugins.
   As to option names... Perhaps -elv and -elvi. another thought I had was -eL 
and -eLi, but that might be confusing and with so very few exceptions (-G and 
-eS for example) very uncommon.
   It's good to know, that we can discuss such "insignificant" questions and I 
suppose, that an answer should be easy to find. I don't mind much, as long as 
it works. :-)
   Warmly yours
           Julien
=-=-=-=-=-=-=-=-=-=-=-=-
Such Is Life: Very Intensely Adorable;
Frightening Absence Just Arriving, Reigns Disappeared, Ornate - flowers!

======      Find my music at      ======
http://juliencoder.de/nama/music.html
.....................................
"If you live to be 100, I hope I live to be 100 minus 1 day,
so I never have to live without you." (Winnie the Pooh)

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Ecasound-list mailing list
Ecasound-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecasound-list

Kai Vehmanen | 10 Aug 18:36 2011

Re: LV2 Plugin Support

Hi,

On Wed, 10 Aug 2011, Jeremy Salwen wrote:

> LV2 plugin support is coming along nicely, and I'm getting to

that's some exciting piece of news! :)

> questions like "what should the identifier for LV2 plugins be?"  I'm 
> referring of course to the string that is "el" in the case of ladspa 
> plugins, i.e. a plugin might be identified as
>  "el:sine_fcac".  What prefix should an LV2 plugin be identified with?

Naming of the command-line visible options has been, uhm, how to put it, 
artistic, so there are no strict guidelines in place. OTOH, it's not 
completely chaotic, so related things are usually named in a similar way 
(e.g. -etd is Effect -> Timebased -> Delay).

With that background, my proposals would be "-elv2" (LV2 plugin 
implementing the ecasound effect interface), or just "-lv2" (shorter but 
still easily understandable).
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Ecasound-list mailing list
Ecasound-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Jeremy Salwen | 11 Aug 04:29 2011
Picon

Re: LV2 Plugin Support

I suppose I'll just go ahead with -elv2:

However, there are two remaining issues I see: 

1. Memory management
2. MIDI ports on LV2 plugins

As for memory management, part of me is confused on how exactly ecasound handles things, and part of me is just unsure what I should do in this case.  Bascially, from what I can tell, ecasound keeps a map of string->Object around which includes *all* possible effects, and this map is never freed.  Lilv uses something called the "LilvWorld", which can't be freed until everything else deriving from it is freed.  It would seem to me that this would mean that I should *never* free the LilvWorld, as ECA_OBJECT_FACTORY will always contain references to LV2 plugins which would be invalidated if I were to free it.  So I was thinking of a couple possible options of dealing with the LilvWorld:  #1, I could store it statically in some class ...but I'm not sure where it would logically belong.  The Lilv objects are mainly instantiated in ECA_STATIC_OBJECT_MAPS, but they are mainly referenced in EFFECT_LV2, but they are stored in ECA_OBJECT_FACTORY. I could see arguments for it to be stored in any of these three.  #2. I could just pass the LilvWorld around as an additional argument to a bunch of functions, and let every class that needs it keep a non-static local pointer to it.  This requires the least hard design decisions... but it makes thing messy by adding all this additional argument passing.  #3 I could write a C++ wrapper around Lilv which would properly reference count all the objects, so I wouldn't have to worry at all about memory at all from within ecasound... but that takes the most work and I'm not sure if it's really necessary.

As for MIDI ports, I don't know if there is infrastructure in place for plugins to handle MIDI or other events with Chain effects.  I could look to the LADSPA plugin support for examples of handling audio and control ports, but I'm not sure where to look for for an example of how to implement MIDI, if at all possible.  To make matters complicated, it seems the LV2 developers are in the middle of drafting a new extension for event ports of all types, including MIDI, which is to replace the old one.

Jeremy

On Wed, Aug 10, 2011 at 12:36 PM, Kai Vehmanen <kvehmanen <at> eca.cx> wrote:
Hi,


On Wed, 10 Aug 2011, Jeremy Salwen wrote:

LV2 plugin support is coming along nicely, and I'm getting to

that's some exciting piece of news! :)


questions like "what should the identifier for LV2 plugins be?"  I'm referring of course to the string that is "el" in the case of ladspa plugins, i.e. a plugin might be identified as
 "el:sine_fcac".  What prefix should an LV2 plugin be identified with?

Naming of the command-line visible options has been, uhm, how to put it, artistic, so there are no strict guidelines in place. OTOH, it's not completely chaotic, so related things are usually named in a similar way (e.g. -etd is Effect -> Timebased -> Delay).

With that background, my proposals would be "-elv2" (LV2 plugin implementing the ecasound effect interface), or just "-lv2" (shorter but still easily understandable).

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. 
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Ecasound-list mailing list
Ecasound-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecasound-list

Gmane