Csound Csound-dev Csound-tekno Search About

[Csnd] some questions..

Date2010-08-24 17:43
FromLars Indrek Hansson
Subject[Csnd] some questions..
 

Hello,


I wonder if there is anyone who could help me with the following questions:


1.I don´t get the macro ”include” function to work and can´t really see what I´m doing wrong. I have put the file in question in a folder named ”Include” in the working directory and set INCDIR in the environment variables to this folder, named the file ”Fltk macro.inc” (says so in the manual it should have this suffix), written #include "Fltk macro.inc" in the score and it still doesn´t work. I've tried without the suffix, by placing the file in various folders and with a full path, but to no avail. Am I doing any mistake or is it a bug?


2. I´ve designed an instrument (hardware) with piezo-microphones placed on pads that trigger sounds in csound. It works very well provided that the signal is amplified through a micamp first.

First I only worked with continuous signals then I wanted to have an instrument that triggered sounds in the same way as a MIDI-drumpad. So I designed an instrument with the trigger and schedkwhen opcodes. The triggering works fine but the problem is that I can´t seem to get the schedkwhen to fetch any other amplitude other than the threshold value. The output signal from the piezo of course is bound to have a short slope before it reaches maximum which renders the threshold value regardless if I hit the pad hard or soft. Does anyone know how to solve this problem? Maybe there are standard solutions for patches like this?


The first lines of code is to expand and limit the input signal a bit. In order to get as fast response as possible I set attack and release of the expander to zero.


3. At the moment I´m running csound on Windows 7. Exactly what are the pros and cons with using Linux instead (other than lower latency)? I've heard that there are som issues with the Fltk opcodes. Are they big enough to deter you from switching to Linux? Can you count on it that Linux has drivers for your audio interface?

 

Best regards,

Lars



instr 70


a10 in


ares1 limit a10, 500, 32768

afilt1 butterlp ares1,10

acomp1 compress afilt1,afilt1,14,22,46,.55,0,0,.01

kres1a downsamp acomp1

kres1b limit kres1a , 1500, 32768


ktrigger1 trigger kres1b,2900,0           ;THRESHOLD SET TO 2900


schedkwhen ktrigger1,0, 0,71,0,.001,kres1b,68 ;AMP IN P4 SAME AS ;TRIGGER SIGNAL

endin




instr 71                                              ;SAMPLE PLAYING INSTR


idur tableng p5                                   ;P5=TABLE WITH ;SOUNDFILE

p3=idur/sr


kenv linseg 0,.01,1,p3-.02,1,.01,0

a1 loscil p4*kenv, 1,p5


out a1


endin


Date2010-08-24 17:56
FromMichael Gogins
Subject[Csnd] Re: some questions..
Don't put spaces in filenames.

Hope this helps,
Mike

On Tue, Aug 24, 2010 at 12:43 PM, Lars Indrek Hansson
 wrote:
>
>
> Hello,
>
> I wonder if there is anyone who could help me with the following questions:
>
> 1.I don´t get the macro ”include” function to work and can´t really see what
> I´m doing wrong. I have put the file in question in a folder named ”Include”
> in the working directory and set INCDIR in the environment variables to this
> folder, named the file ”Fltk macro.inc” (says so in the manual it should
> have this suffix), written #include "Fltk macro.inc" in the score and it
> still doesn´t work. I've tried without the suffix, by placing the file in
> various folders and with a full path, but to no avail. Am I doing any
> mistake or is it a bug?
>
> 2. I´ve designed an instrument (hardware) with piezo-microphones placed on
> pads that trigger sounds in csound. It works very well provided that the
> signal is amplified through a micamp first.
>
> First I only worked with continuous signals then I wanted to have an
> instrument that triggered sounds in the same way as a MIDI-drumpad. So I
> designed an instrument with the trigger and schedkwhen opcodes. The
> triggering works fine but the problem is that I can´t seem to get the
> schedkwhen to fetch any other amplitude other than the threshold value. The
> output signal from the piezo of course is bound to have a short slope before
> it reaches maximum which renders the threshold value regardless if I hit the
> pad hard or soft. Does anyone know how to solve this problem? Maybe there
> are standard solutions for patches like this?
>
> The first lines of code is to expand and limit the input signal a bit. In
> order to get as fast response as possible I set attack and release of the
> expander to zero.
>
> 3. At the moment I´m running csound on Windows 7. Exactly what are the pros
> and cons with using Linux instead (other than lower latency)? I've heard
> that there are som issues with the Fltk opcodes. Are they big enough to
> deter you from switching to Linux? Can you count on it that Linux has
> drivers for your audio interface?
>
>
>
> Best regards,
>
> Lars
>
> instr 70
>
> a10 in
>
> ares1 limit a10, 500, 32768
>
> afilt1 butterlp ares1,10
>
> acomp1 compress afilt1,afilt1,14,22,46,.55,0,0,.01
>
> kres1a downsamp acomp1
>
> kres1b limit kres1a , 1500, 32768
>
> ktrigger1 trigger kres1b,2900,0           ;THRESHOLD SET TO 2900
>
> schedkwhen ktrigger1,0, 0,71,0,.001,kres1b,68 ;AMP IN P4 SAME AS ;TRIGGER
> SIGNAL
>
> endin
>
>
> instr 71                                              ;SAMPLE PLAYING INSTR
>
> idur tableng p5                                   ;P5=TABLE WITH ;SOUNDFILE
>
> p3=idur/sr
>
> kenv linseg 0,.01,1,p3-.02,1,.01,0
>
> a1 loscil p4*kenv, 1,p5
>
> out a1
>
> endin



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2010-08-24 18:09
FromLars Indrek Hansson
Subject[Csnd] RE: Re: some questions..
I tried with several different filenames without spaces and it didn´t help.
 
Lars
 
> Date: Tue, 24 Aug 2010 12:56:02 -0400
> From: michael.gogins@gmail.com
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] Re: some questions..
>
> Don't put spaces in filenames.
>
> Hope this helps,
> Mike
>
> On Tue, Aug 24, 2010 at 12:43 PM, Lars Indrek Hansson
> <lars.indrek.hansson@hotmail.com> wrote:
> >
> >
> > Hello,
> >
> > I wonder if there is anyone who could help me with the following questions:
> >
> > 1.I don´t get the macro ”include” function to work and can´t really see what
> > I´m doing wrong. I have put the file in question in a folder named ”Include”
> > in the working directory and set INCDIR in the environment variables to this
> > folder, named the file ”Fltk macro.inc” (says so in the manual it should
> > have this suffix), written #include "Fltk macro.inc" in the score and it
> > still doesn´t work. I've tried without the suffix, by placing the file in
> > various folders and with a full path, but to no avail. Am I doing any
> > mistake or is it a bug?
> >
> > 2. I´ve designed an instrument (hardware) with piezo-microphones placed on
> > pads that trigger sounds in csound. It works very well provided that the
> > signal is amplified through a micamp first.
> >
> > First I only worked with continuous signals then I wanted to have an
> > instrument that triggered sounds in the same way as a MIDI-drumpad. So I
> > designed an instrument with the trigger and schedkwhen opcodes. The
> > triggering works fine but the problem is that I can´t seem to get the
> > schedkwhen to fetch any other amplitude other than the threshold value. The
> > output signal from the piezo of course is bound to have a short slope before
> > it reaches maximum which renders the threshold value regardless if I hit the
> > pad hard or soft. Does anyone know how to solve this problem? Maybe there
> > are standard solutions for patches like this?
> >
> > The first lines of code is to expand and limit the input signal a bit. In
> > order to get as fast response as possible I set attack and release of the
> > expander to zero.
> >
> > 3. At the moment I´m running csound on Windows 7. Exactly what are the pros
> > and cons with using Linux instead (other than lower latency)? I've heard
> > that there are som issues with the Fltk opcodes. Are they big enough to
> > deter you from switching to Linux? Can you count on it that Linux has
> > drivers for your audio interface?
> >
> >
> >
> > Best regards,
> >
> > Lars
> >
> > instr 70
> >
> > a10 in
> >
> > ares1 limit a10, 500, 32768
> >
> > afilt1 butterlp ares1,10
> >
> > acomp1 compress afilt1,afilt1,14,22,46,.55,0,0,.01
> >
> > kres1a downsamp acomp1
> >
> > kres1b limit kres1a , 1500, 32768
> >
> > ktrigger1 trigger kres1b,2900,0           ;THRESHOLD SET TO 2900
> >
> > schedkwhen ktrigger1,0, 0,71,0,.001,kres1b,68 ;AMP IN P4 SAME AS ;TRIGGER
> > SIGNAL
> >
> > endin
> >
> >
> > instr 71                                              ;SAMPLE PLAYING INSTR
> >
> > idur tableng p5                                   ;P5=TABLE WITH ;SOUNDFILE
> >
> > p3=idur/sr
> >
> > kenv linseg 0,.01,1,p3-.02,1,.01,0
> >
> > a1 loscil p4*kenv, 1,p5
> >
> > out a1
> >
> > endin
>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>

Date2010-08-24 18:31
FromMichael Gogins
Subject[Csnd] Re: RE: Re: some questions..
The way I do it:

#include "patches/HeavyMetal"

I run Csound in a directory that has "patches" as a subdirectory. It
contains a file "HeavyMetal".

I don't use the environment variable and I don't use the ".inc" suffix
anywhere at all.

This definitely works on Windows and Linux.

Regards,
Mike

On Tue, Aug 24, 2010 at 1:09 PM, Lars Indrek Hansson
 wrote:
> I tried with several different filenames without spaces and it didn´t help.
>
> Lars
>
>> Date: Tue, 24 Aug 2010 12:56:02 -0400
>> From: michael.gogins@gmail.com
>> To: csound@lists.bath.ac.uk
>> Subject: [Csnd] Re: some questions..
>>
>> Don't put spaces in filenames.
>>
>> Hope this helps,
>> Mike
>>
>> On Tue, Aug 24, 2010 at 12:43 PM, Lars Indrek Hansson
>>  wrote:
>> >
>> >
>> > Hello,
>> >
>> > I wonder if there is anyone who could help me with the following
>> > questions:
>> >
>> > 1.I don´t get the macro ”include” function to work and can´t really see
>> > what
>> > I´m doing wrong. I have put the file in question in a folder named
>> > ”Include”
>> > in the working directory and set INCDIR in the environment variables to
>> > this
>> > folder, named the file ”Fltk macro.inc” (says so in the manual it should
>> > have this suffix), written #include "Fltk macro.inc" in the score and it
>> > still doesn´t work. I've tried without the suffix, by placing the file
>> > in
>> > various folders and with a full path, but to no avail. Am I doing any
>> > mistake or is it a bug?
>> >
>> > 2. I´ve designed an instrument (hardware) with piezo-microphones placed
>> > on
>> > pads that trigger sounds in csound. It works very well provided that the
>> > signal is amplified through a micamp first.
>> >
>> > First I only worked with continuous signals then I wanted to have an
>> > instrument that triggered sounds in the same way as a MIDI-drumpad. So I
>> > designed an instrument with the trigger and schedkwhen opcodes. The
>> > triggering works fine but the problem is that I can´t seem to get the
>> > schedkwhen to fetch any other amplitude other than the threshold value.
>> > The
>> > output signal from the piezo of course is bound to have a short slope
>> > before
>> > it reaches maximum which renders the threshold value regardless if I hit
>> > the
>> > pad hard or soft. Does anyone know how to solve this problem? Maybe
>> > there
>> > are standard solutions for patches like this?
>> >
>> > The first lines of code is to expand and limit the input signal a bit.
>> > In
>> > order to get as fast response as possible I set attack and release of
>> > the
>> > expander to zero.
>> >
>> > 3. At the moment I´m running csound on Windows 7. Exactly what are the
>> > pros
>> > and cons with using Linux instead (other than lower latency)? I've heard
>> > that there are som issues with the Fltk opcodes. Are they big enough to
>> > deter you from switching to Linux? Can you count on it that Linux has
>> > drivers for your audio interface?
>> >
>> >
>> >
>> > Best regards,
>> >
>> > Lars
>> >
>> > instr 70
>> >
>> > a10 in
>> >
>> > ares1 limit a10, 500, 32768
>> >
>> > afilt1 butterlp ares1,10
>> >
>> > acomp1 compress afilt1,afilt1,14,22,46,.55,0,0,.01
>> >
>> > kres1a downsamp acomp1
>> >
>> > kres1b limit kres1a , 1500, 32768
>> >
>> > ktrigger1 trigger kres1b,2900,0           ;THRESHOLD SET TO 2900
>> >
>> > schedkwhen ktrigger1,0, 0,71,0,.001,kres1b,68 ;AMP IN P4 SAME AS
>> > ;TRIGGER
>> > SIGNAL
>> >
>> > endin
>> >
>> >
>> > instr 71                                              ;SAMPLE PLAYING
>> > INSTR
>> >
>> > idur tableng p5                                   ;P5=TABLE WITH
>> > ;SOUNDFILE
>> >
>> > p3=idur/sr
>> >
>> > kenv linseg 0,.01,1,p3-.02,1,.01,0
>> >
>> > a1 loscil p4*kenv, 1,p5
>> >
>> > out a1
>> >
>> > endin
>>
>>
>>
>> --
>> Michael Gogins
>> Irreducible Productions
>> http://www.michael-gogins.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2010-08-24 20:48
Fromluis jure
Subject[Csnd] Re: some questions..
on 2010-08-24 at 18:43 Lars Indrek Hansson wrote:

>3. At the moment I´m running csound on Windows 7. Exactly what are the
>pros and cons with using Linux instead (other than lower latency)? I've
>heard that there are som issues with the Fltk opcodes. Are they big
>enough to deter you from switching to Linux? 

i don't use the FLTK opcodes much, but i never had any issues with them.
what kind of problem have you heard there are?


> Can you count on it that Linux has drivers for your audio interface?

i'm afraid not, you should always check if a given card is supported by
alsa.



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2010-08-24 22:18
Fromjoachim heintz
Subject[Csnd] Re: some questions..
Hi Lars -

can you describe this ...

> So I designed an instrument with the trigger and schedkwhen opcodes.  
> The triggering works fine but the problem is that I can´t seem to  
> get the schedkwhen to fetch any other amplitude other than the  
> threshold value. The output signal from the piezo of course is bound  
> to have a short slope before it reaches maximum which renders the  
> threshold value regardless if I hit the pad hard or soft. Does  
> anyone know how to solve this problem? Maybe there are standard  
> solutions for patches like this?
>

... at an example? I don't understand what it means that triggering  
works, but that you always get the threshold value.

	joachim

Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2010-08-24 23:10
FromOeyvind Brandtsegg
Subject[Csnd] Re: RE: Re: some questions..
Just a shot in the dark maybe:
do you have the #include statement at the start of a line ?
I seem to remember it failing to run if the statment was indented
(should be fixed or documented if it's still so).
best,
Oeyvind

2010/8/24 Lars Indrek Hansson :
> I tried with several different filenames without spaces and it didn´t help.
>
> Lars
>
>> Date: Tue, 24 Aug 2010 12:56:02 -0400
>> From: michael.gogins@gmail.com
>> To: csound@lists.bath.ac.uk
>> Subject: [Csnd] Re: some questions..
>>
>> Don't put spaces in filenames.
>>
>> Hope this helps,
>> Mike
>>
>> On Tue, Aug 24, 2010 at 12:43 PM, Lars Indrek Hansson
>>  wrote:
>> >
>> >
>> > Hello,
>> >
>> > I wonder if there is anyone who could help me with the following
>> > questions:
>> >
>> > 1.I don´t get the macro ”include” function to work and can´t really see
>> > what
>> > I´m doing wrong. I have put the file in question in a folder named
>> > ”Include”
>> > in the working directory and set INCDIR in the environment variables to
>> > this
>> > folder, named the file ”Fltk macro.inc” (says so in the manual it should
>> > have this suffix), written #include "Fltk macro.inc" in the score and it
>> > still doesn´t work. I've tried without the suffix, by placing the file
>> > in
>> > various folders and with a full path, but to no avail. Am I doing any
>> > mistake or is it a bug?
>> >
>> > 2. I´ve designed an instrument (hardware) with piezo-microphones placed
>> > on
>> > pads that trigger sounds in csound. It works very well provided that the
>> > signal is amplified through a micamp first.
>> >
>> > First I only worked with continuous signals then I wanted to have an
>> > instrument that triggered sounds in the same way as a MIDI-drumpad. So I
>> > designed an instrument with the trigger and schedkwhen opcodes. The
>> > triggering works fine but the problem is that I can´t seem to get the
>> > schedkwhen to fetch any other amplitude other than the threshold value.
>> > The
>> > output signal from the piezo of course is bound to have a short slope
>> > before
>> > it reaches maximum which renders the threshold value regardless if I hit
>> > the
>> > pad hard or soft. Does anyone know how to solve this problem? Maybe
>> > there
>> > are standard solutions for patches like this?
>> >
>> > The first lines of code is to expand and limit the input signal a bit.
>> > In
>> > order to get as fast response as possible I set attack and release of
>> > the
>> > expander to zero.
>> >
>> > 3. At the moment I´m running csound on Windows 7. Exactly what are the
>> > pros
>> > and cons with using Linux instead (other than lower latency)? I've heard
>> > that there are som issues with the Fltk opcodes. Are they big enough to
>> > deter you from switching to Linux? Can you count on it that Linux has
>> > drivers for your audio interface?
>> >
>> >
>> >
>> > Best regards,
>> >
>> > Lars
>> >
>> > instr 70
>> >
>> > a10 in
>> >
>> > ares1 limit a10, 500, 32768
>> >
>> > afilt1 butterlp ares1,10
>> >
>> > acomp1 compress afilt1,afilt1,14,22,46,.55,0,0,.01
>> >
>> > kres1a downsamp acomp1
>> >
>> > kres1b limit kres1a , 1500, 32768
>> >
>> > ktrigger1 trigger kres1b,2900,0           ;THRESHOLD SET TO 2900
>> >
>> > schedkwhen ktrigger1,0, 0,71,0,.001,kres1b,68 ;AMP IN P4 SAME AS
>> > ;TRIGGER
>> > SIGNAL
>> >
>> > endin
>> >
>> >
>> > instr 71                                              ;SAMPLE PLAYING
>> > INSTR
>> >
>> > idur tableng p5                                   ;P5=TABLE WITH
>> > ;SOUNDFILE
>> >
>> > p3=idur/sr
>> >
>> > kenv linseg 0,.01,1,p3-.02,1,.01,0
>> >
>> > a1 loscil p4*kenv, 1,p5
>> >
>> > out a1
>> >
>> > endin
>>
>>
>>
>> --
>> Michael Gogins
>> Irreducible Productions
>> http://www.michael-gogins.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2010-08-24 23:13
FromOeyvind Brandtsegg
Subject[Csnd] Re: Re: some questions..
For the attack detection/trigger thing,
maybe you could do an rms on the audio input, and use this as the amp
value in schedkwhen?
krms   rms   a1

Oeyvind

2010/8/24 joachim heintz :
>
> Hi Lars -
>
> can you describe this ...
>
>> So I designed an instrument with the trigger and schedkwhen opcodes. The
>> triggering works fine but the problem is that I can´t seem to get the
>> schedkwhen to fetch any other amplitude other than the threshold value. The
>> output signal from the piezo of course is bound to have a short slope before
>> it reaches maximum which renders the threshold value regardless if I hit the
>> pad hard or soft. Does anyone know how to solve this problem? Maybe there
>> are standard solutions for patches like this?
>>
>
> ... at an example? I don't understand what it means that triggering works,
> but that you always get the threshold value.
>
>        joachim
>
> Send bugs reports to the Sourceforge bug tracker
>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2010-08-25 09:36
FromLars Indrek Hansson
Subject[Csnd] RE: Re: Re: some questions..
I didn´t have an indent on the #include opcode. Actually the whole thing worked for short while and I
compiled successfully. Then I decided to find out exactly in which folder it had to be in order for csound 
to find by means of exclusion. I removed them one by one and finally it it didn´t work anymore. But somehow when I put the file back in the same places it didn´t work again. Must have missed to put them back in the same order. I have no idea what it can be. Tried Michaels advice, but it didn´t work either.  
 
As for the trigger/schedkwhen patch I´ve never used the rms opcode before but I read some about it.
It says that it smoothens the signal (I´m not sure I know exactly what root mean square is. Root square-yes, but root mean square) Is that really what I need? Maybe I should put a small delay time in the schedkwhen so that it fetches the amp value when the attack slope has reached the maximum?
 
Lars
 
> Date: Wed, 25 Aug 2010 00:13:47 +0200
> From: oyvind.brandtsegg@ntnu.no
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] Re: Re: some questions..
>
> For the attack detection/trigger thing,
> maybe you could do an rms on the audio input, and use this as the amp
> value in schedkwhen?
> krms rms a1
>
> Oeyvind
>
> 2010/8/24 joachim heintz <jh@joachimheintz.de>:
> >
> > Hi Lars -
> >
> > can you describe this ...
> >
> >> So I designed an instrument with the trigger and schedkwhen opcodes. The
> >> triggering works fine but the problem is that I can´t seem to get the
> >> schedkwhen to fetch any other amplitude other than the threshold value. The
> >> output signal from the piezo of course is bound to have a short slope before
> >> it reaches maximum which renders the threshold value regardless if I hit the
> >> pad hard or soft. Does anyone know how to solve this problem? Maybe there
> >> are standard solutions for patches like this?
> >>
> >
> > ... at an example? I don't understand what it means that triggering works,
> > but that you always get the threshold value.
> >
> >        joachim
> >
> > Send bugs reports to the Sourceforge bug tracker
> >           https://sourceforge.net/tracker/?group_id=81968&atid=564599
> > Discussions of bugs and features can be posted here
> > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> > csound"
> >
> >
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>

Date2010-08-25 11:03
FromIain McCurdy
Subject[Csnd] RE: some questions..
Hi Lars,

This is maybe what you are after. You may need some additional check to prevent double triggering.

0dbfs    =    1
gisine    ftgen    0,0,4096,10,1
;MAXIMUM RMS VALUE ACROSS A SINGLE SCANNING PERIOD
gkmax    init    0
    
instr    1 ;SENSE INPUT
;THRESHOLD ABOVE WHICH RMS VALUE WILL TRIGGER A NOTE
ithreshold    init    0.02
;LENGTH OF TIME TO SCAN FOR THE AMPLITUDE PEAK
iSampleTime    init    0.01
a1    inch    1
kRMS rms a1
;COMPARE CURRENT RMS VALUE TO MAXIMUM SO FAR. CHOOSE HIGHEST FOR gkmax
gkmax    =    (kRMS>gkmax?kRMS:gkmax)
;TRIGGER IF THRESHOLD IS CROSSED
ktrigger    trigger    kRMS, ithreshold, 0
;DELAY TRIGGER TO ALLOW SAMPLING OF MAXIMUM VALUE
ktrigger    delayk    ktrigger, iSampleTime
;DERIVE AN AMPLITUDE VALUE
aamp    follow2    a1, 0.01, 0.01
kamp    downsamp    aamp
;                                       p4
schedkwhen    ktrigger, 0, 0, 2, 0, 1, kamp
endin    

instr    2 ;INDICATOR INSTRUMENT
;RESET RMS MAXIMUM VARIABLE 
gkmax    init    0
aenv    expon    1,p3,0.001
;PRINT RECEIVED AMPLITUDE VALUE
print    p4
a1    oscili    p4*aenv, 600, gisine
outs    a1,a1
endin




bye, Iain


________________________________
> From: lars.indrek.hansson@hotmail.com
> To: csound@lists.bath.ac.uk
> Date: Wed, 25 Aug 2010 10:36:43 +0200
> Subject: [Csnd] RE: Re: Re: some questions..
>
> I didn´t have an indent on the #include opcode. Actually the whole
> thing worked for short while and I
> compiled successfully. Then I decided to find out exactly in which
> folder it had to be in order for csound
> to find by means of exclusion. I removed them one by one and finally it
> it didn´t work anymore. But somehow when I put the file back in the
> same places it didn´t work again. Must have missed to put them back in
> the same order. I have no idea what it can be. Tried Michaels advice,
> but it didn´t work either.
>
> As for the trigger/schedkwhen patch I´ve never used the rms opcode
> before but I read some about it.
> It says that it smoothens the signal (I´m not sure I know exactly what
> root mean square is. Root square-yes, but root mean square) Is that
> really what I need? Maybe I should put a small delay time in the
> schedkwhen so that it fetches the amp value when the attack slope has
> reached the maximum?
>
> Lars
>
>> Date: Wed, 25 Aug 2010 00:13:47 +0200
>> From: oyvind.brandtsegg@ntnu.no
>> To: csound@lists.bath.ac.uk
>> Subject: [Csnd] Re: Re: some questions..
>>
>> For the attack detection/trigger thing,
>> maybe you could do an rms on the audio input, and use this as the amp
>> value in schedkwhen?
>> krms rms a1
>>
>> Oeyvind
>>
>> 2010/8/24 joachim heintz :
>>>
>>> Hi Lars -
>>>
>>> can you describe this ...
>>>
>>>> So I designed an instrument with the trigger and schedkwhen opcodes. The
>>>> triggering works fine but the problem is that I can´t seem to get the
>>>> schedkwhen to fetch any other amplitude other than the threshold
> value. The
>>>> output signal from the piezo of course is bound to have a short
> slope before
>>>> it reaches maximum which renders the threshold value regardless if
> I hit the
>>>> pad hard or soft. Does anyone know how to solve this problem?
> Maybe there
>>>> are standard solutions for patches like this?
>>>>
>>>
>>> ... at an example? I don't understand what it means that triggering
> works,
>>> but that you always get the threshold value.
>>>
>>> joachim
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe csound"
>>
 		 	   		  

Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2010-08-25 11:51
Fromluis jure
Subject[Csnd] Re: RE: Re: Re: some questions..
on 2010-08-25 at 10:36 Lars Indrek Hansson wrote:


>It says that it smoothens the signal (I´m not sure I know exactly what
>root mean square is. Root square-yes, but root mean square) 

it means exactly that: you square all the samples, find the mean, and then
take the (square) root

better expressed, according to the wikipedia: The RMS or quadratic
mean of a set of values is the square root of the arithmetic mean
(average) of the squares of the original values

http://en.wikipedia.org/wiki/Root_mean_square



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2010-08-25 11:57
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: RE: Re: Re: some questions..
Implemented as a lowpass filter on teh square of the signal.  Provides a
measure of power in recent time.

>
> on 2010-08-25 at 10:36 Lars Indrek Hansson wrote:
>
>
>>It says that it smoothens the signal (I´m not sure I know exactly what
>>root mean square is. Root square-yes, but root mean square)
>
> it means exactly that: you square all the samples, find the mean, and then
> take the (square) root
>
> better expressed, according to the wikipedia: The RMS or quadratic
> mean of a set of values is the square root of the arithmetic mean
> (average) of the squares of the original values
>
> http://en.wikipedia.org/wiki/Root_mean_square
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
>
>




Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-08-25 15:18
FromLars Indrek Hansson
Subject[Csnd] RE: RE: some questions..
Thanks Iain. Looks intriguing. I´ll check it out
 
Lars
 
> From: i_mccurdy@hotmail.com
> To: csound@lists.bath.ac.uk
> Date: Wed, 25 Aug 2010 10:03:40 +0000
> Subject: [Csnd] RE: some questions..
>
>
> Hi Lars,
>
> This is maybe what you are after. You may need some additional check to prevent double triggering.
>
> 0dbfs    =    1
> gisine    ftgen    0,0,4096,10,1
> ;MAXIMUM RMS VALUE ACROSS A SINGLE SCANNING PERIOD
> gkmax    init    0
>    
> instr    1 ;SENSE INPUT
> ;THRESHOLD ABOVE WHICH RMS VALUE WILL TRIGGER A NOTE
> ithreshold    init    0.02
> ;LENGTH OF TIME TO SCAN FOR THE AMPLITUDE PEAK
> iSampleTime    init    0.01
> a1    inch    1
> kRMS rms a1
> ;COMPARE CURRENT RMS VALUE TO MAXIMUM SO FAR. CHOOSE HIGHEST FOR gkmax
> gkmax    =    (kRMS>gkmax?kRMS:gkmax)
> ;TRIGGER IF THRESHOLD IS CROSSED
> ktrigger    trigger    kRMS, ithreshold, 0
> ;DELAY TRIGGER TO ALLOW SAMPLING OF MAXIMUM VALUE
> ktrigger    delayk    ktrigger, iSampleTime
> ;DERIVE AN AMPLITUDE VALUE
> aamp    follow2    a1, 0.01, 0.01
> kamp    downsamp    aamp
> ;                                       p4
> schedkwhen    ktrigger, 0, 0, 2, 0, 1, kamp
> endin   
>
> instr    2 ;INDICATOR INSTRUMENT
> ;RESET RMS MAXIMUM VARIABLE
> gkmax    init    0
> aenv    expon    1,p3,0.001
> ;PRINT RECEIVED AMPLITUDE VALUE
> print    p4
> a1    oscili    p4*aenv, 600, gisine
> outs    a1,a1
> endin
>
>
>
>
> bye, Iain
>
>
> ________________________________
> > From: lars.indrek.hansson@hotmail.com
> > To: csound@lists.bath.ac.uk
> > Date: Wed, 25 Aug 2010 10:36:43 +0200
> > Subject: [Csnd] RE: Re: Re: some questions..
> >
> > I didn´t have an indent on the #include opcode. Actually the whole
> > thing worked for short while and I
> > compiled successfully. Then I decided to find out exactly in which
> > folder it had to be in order for csound
> > to find by means of exclusion. I removed them one by one and finally it
> > it didn´t work anymore. But somehow when I put the file back in the
> > same places it didn´t work again. Must have missed to put them back in
> > the same order. I have no idea what it can be. Tried Michaels advice,
> > but it didn´t work either.
> >
> > As for the trigger/schedkwhen patch I´ve never used the rms opcode
> > before but I read some about it.
> > It says that it smoothens the signal (I´m not sure I know exactly what
> > root mean square is. Root square-yes, but root mean square) Is that
> > really what I need? Maybe I should put a small delay time in the
> > schedkwhen so that it fetches the amp value when the attack slope has
> > reached the maximum?
> >
> > Lars
> >
> >> Date: Wed, 25 Aug 2010 00:13:47 +0200
> >> From: oyvind.brandtsegg@ntnu.no
> >> To: csound@lists.bath.ac.uk
> >> Subject: [Csnd] Re: Re: some questions..
> >>
> >> For the attack detection/trigger thing,
> >> maybe you could do an rms on the audio input, and use this as the amp
> >> value in schedkwhen?
> >> krms rms a1
> >>
> >> Oeyvind
> >>
> >> 2010/8/24 joachim heintz :
> >>>
> >>> Hi Lars -
> >>>
> >>> can you describe this ...
> >>>
> >>>> So I designed an instrument with the trigger and schedkwhen opcodes. The
> >>>> triggering works fine but the problem is that I can´t seem to get the
> >>>> schedkwhen to fetch any other amplitude other than the threshold
> > value. The
> >>>> output signal from the piezo of course is bound to have a short
> > slope before
> >>>> it reaches maximum which renders the threshold value regardless if
> > I hit the
> >>>> pad hard or soft. Does anyone know how to solve this problem?
> > Maybe there
> >>>> are standard solutions for patches like this?
> >>>>
> >>>
> >>> ... at an example? I don't understand what it means that triggering
> > works,
> >>> but that you always get the threshold value.
> >>>
> >>> joachim
> >>>
> >>> Send bugs reports to the Sourceforge bug tracker
> >>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >>> Discussions of bugs and features can be posted here
> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> >>> csound"
> >>>
> >>>
> >>
> >>
> >> Send bugs reports to the Sourceforge bug tracker
> >> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> >> Discussions of bugs and features can be posted here
> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> > "unsubscribe csound"
> >>
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>