Csound Csound-dev Csound-tekno Search About

[Csnd] OSC control (Pitch)

Date2014-05-09 09:21
Fromfauveboy
Subject[Csnd] OSC control (Pitch)
So the other day I've been going through a tutorial with help from the forum
to start using OSC. I've uploaded another screen shot today because in 
addition to the tutorial I've tried to add a control in pure data to adjust
frequency, rather than just volume '/amp'.It has worked to some extent
however, the volume has dropped considerably and a sort of pulse has
developed as I change the pitch now like its not oscillating but rather
scanning through a sample, is that down to something I've not considered
within the script?

P.s is there a less crude way to stop the script oscillating in the terminal
instead of what Im doing with "cmd q" (which also makes a loud pop if the
volumes up)

Thanks once again  Screen_Shot_2014-05-09_at_09.png
  



--
View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-05-09 10:19
FromEd Costello
SubjectRe: [Csnd] OSC control (Pitch)
Hi
You are using two osc listens in one instrument, is that necessary? You can send pitch and amplitude in one message. Linked to that you are using the same kans variable for both opcodes, the second one will overwrite the first one I think.
You should also use some control flow when using the osc opcodes, there is an example in the manual about that.
What I would do would be to make one always on instrument to listen for osc messages, use the correct control flow as per the manual. I would also assign the osc inputs (kamp, kcps) to global variables  and then use them in a seperate instrument.
Ed


On 9 May 2014 10:21, fauveboy <joel.ramsbottom@hotmail.co.uk> wrote:
So the other day I've been going through a tutorial with help from the forum
to start using OSC. I've uploaded another screen shot today because in
addition to the tutorial I've tried to add a control in pure data to adjust
frequency, rather than just volume '/amp'.It has worked to some extent
however, the volume has dropped considerably and a sort of pulse has
developed as I change the pitch now like its not oscillating but rather
scanning through a sample, is that down to something I've not considered
within the script?

P.s is there a less crude way to stop the script oscillating in the terminal
instead of what Im doing with "cmd q" (which also makes a loud pop if the
volumes up)

Thanks once again  Screen_Shot_2014-05-09_at_09.png
<http://csound.1045644.n5.nabble.com/file/n5735054/Screen_Shot_2014-05-09_at_09.png>



--
View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





Date2014-05-09 10:27
FromEd Costello
SubjectRe: [Csnd] OSC control (Pitch)
I havent tested this with osc so it might need tweaking, but it would be something like this:


 

<CsoundSynthesizer>

<CsOptions>

-o dac

</CsOptions>

<CsInstruments>


0dbfs = 1

nchnls = 2


gihandle OSCinit 7770

gkcps init 0

gkamp init 0


instr 1

kcps init 0

kamp init 0

nxtmsg:

kk OSClisten gihandle, "/my/controls", "ff", kcps, kamp

if (kk == 0) goto ex


gkcps = kcps

gkamp = kamp

kgoto nxtmsg

ex:

endin


instr 2

aout vco2 gkamp, gkcps

out aout

endin

</CsInstruments>

<CsScore>


i1 0 36000

i2 0 36000

</CsScore>

</CsoundSynthesizer>


Ed


On 9 May 2014 11:19, Ed Costello <edwardcostello@gmail.com> wrote:
Hi
You are using two osc listens in one instrument, is that necessary? You can send pitch and amplitude in one message. Linked to that you are using the same kans variable for both opcodes, the second one will overwrite the first one I think.
You should also use some control flow when using the osc opcodes, there is an example in the manual about that.
What I would do would be to make one always on instrument to listen for osc messages, use the correct control flow as per the manual. I would also assign the osc inputs (kamp, kcps) to global variables  and then use them in a seperate instrument.
Ed


On 9 May 2014 10:21, fauveboy <joel.ramsbottom@hotmail.co.uk> wrote:
So the other day I've been going through a tutorial with help from the forum
to start using OSC. I've uploaded another screen shot today because in
addition to the tutorial I've tried to add a control in pure data to adjust
frequency, rather than just volume '/amp'.It has worked to some extent
however, the volume has dropped considerably and a sort of pulse has
developed as I change the pitch now like its not oscillating but rather
scanning through a sample, is that down to something I've not considered
within the script?

P.s is there a less crude way to stop the script oscillating in the terminal
instead of what Im doing with "cmd q" (which also makes a loud pop if the
volumes up)

Thanks once again  Screen_Shot_2014-05-09_at_09.png
<http://csound.1045644.n5.nabble.com/file/n5735054/Screen_Shot_2014-05-09_at_09.png>



--
View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"






Date2014-05-11 11:37
Fromfauveboy
Subject[Csnd] Re: OSC control (Pitch)
Interesting, thank you very much. So I hope you dont mind me uploading
another screen shot here the terminals responding with some info but I think
I need some guidance as to what I need to understand next to get it working.
I've only recently gone through all the youtube tutorials I could find
online and now trying to find more relevant sources , can you tell from this
any other concepts I could try and focus on to get this particular script
working? Or any comments you may think are necessary I could add to the
script so I can start to understand more as to what parts are doing what?
Basically atm I can't work out what other tweaks I may need to make to get
sound to oscillate.

Thank you Screen_Shot_2014-05-11_at_11.png
  



--
View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735121.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-05-11 11:54
FromEd Costello
SubjectRe: [Csnd] Re: OSC control (Pitch)
The osclisten opcode has incorrect arguments, you can see the third argument on the right is "f", this string specifies one float, but as you are taking two float values from the osc input it should be "ff".

Also the address you are receiving on is "/kcps/kamp", and it looks like in pure data you are sending to the addresses "/kcps" and "/kamp", so the address wont work, what you need to do in pure data is send both values to the same address at the same time. I don't know how to do this in pure data but looking at your screenshot I'd imagine its something like [send /control $1 $2], and you plug in both sliders to the same object. Then in csound you would receive on the address "/control".
Hope this helps, if it doesn't let me know and I'll see if I can make an example pure data patch that communicates with csound.


On 11 May 2014 12:37, fauveboy <joel.ramsbottom@hotmail.co.uk> wrote:
Interesting, thank you very much. So I hope you dont mind me uploading
another screen shot here the terminals responding with some info but I think
I need some guidance as to what I need to understand next to get it working.
I've only recently gone through all the youtube tutorials I could find
online and now trying to find more relevant sources , can you tell from this
any other concepts I could try and focus on to get this particular script
working? Or any comments you may think are necessary I could add to the
script so I can start to understand more as to what parts are doing what?
Basically atm I can't work out what other tweaks I may need to make to get
sound to oscillate.

Thank you Screen_Shot_2014-05-11_at_11.png
<http://csound.1045644.n5.nabble.com/file/n5735121/Screen_Shot_2014-05-11_at_11.png>



--
View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735121.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





Date2014-05-12 17:15
Fromfauveboy
Subject[Csnd] Re: OSC control (Pitch)
It does help thank you very much for your support here, Im hoping once I
understand how to get a second parameter working Ill manage to make some
progress without being so reliant, so I hope Im not such a bother...
I've tried a few variations with the addresses and have left it where I am
in the screen shot. I've asked on the Pd forum because Im guessing its still
something I Screen_Shot_2014-05-12_at_17.png
 
m not doing in the Pd patch perhaps?
I hope you don't mind taking another look?
Thanks again!



--
View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735145.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-05-12 17:18
Fromfauveboy
Subject[Csnd] Re: OSC control (Pitch)
...It should get more interesting soon im looking to emulate the monome
Screen_Shot_2014-05-12_at_17.png
  
http://monome.org/  in some way eventually, and I believe it talks in serial
and that is then converted OSC....but thats the next step just out of
interest :)



--
View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735146.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-05-12 19:12
FromRory Walsh
SubjectRe: [Csnd] Re: OSC control (Pitch)
Why bother with OSC? Why not just launch Csound in Pd using the
csoundapi~ object?
http://en.flossmanuals.net/csound/csound-in-pd/
I guess OSC is desirable if you want to move from Pd to somewhere else
afterwards, but if you wish to stick to Pd then the csoundapi~ object
might be a somewhat easier to use.

On 12 May 2014 18:18, fauveboy  wrote:
> ...It should get more interesting soon im looking to emulate the monome
> Screen_Shot_2014-05-12_at_17.png
> 
> http://monome.org/  in some way eventually, and I believe it talks in serial
> and that is then converted OSC....but thats the next step just out of
> interest :)
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735146.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>

Date2014-05-12 19:25
Fromfauveboy
Subject[Csnd] Re: OSC control (Pitch)
I was trying to use Pd as a substitute for the monome atm until I had a
csound script to work how I needed then I was going to work towards the
Monome directly talking to Csound on the raspberry pi headless eventually...
The goal is to eventually have the Monome launch and modulate samples in the
most efficient way I can work out, hence csound as I was under the
impression it has the most potential  for this kind of project...one step at
a time.



--
View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735154.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-05-12 19:34
FromRory Walsh
SubjectRe: [Csnd] Re: OSC control (Pitch)
Ah, I wasn't sure why you persisting with OSC, but I understand now.
Sounds like a good plan.

On 12 May 2014 20:25, fauveboy  wrote:
> I was trying to use Pd as a substitute for the monome atm until I had a
> csound script to work how I needed then I was going to work towards the
> Monome directly talking to Csound on the raspberry pi headless eventually...
> The goal is to eventually have the Monome launch and modulate samples in the
> most efficient way I can work out, hence csound as I was under the
> impression it has the most potential  for this kind of project...one step at
> a time.
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735154.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>

Date2014-05-12 19:38
FromRory Walsh
SubjectRe: [Csnd] Re: OSC control (Pitch)
Btw, Paul Batchelor(member of this list) showed me his
Csound/Monome/RPI at the Csound conference. He would be a good guy to
speak to. I'm sure you could grab his attention by starting a new
thread with 'monome/csound' in the subject :)

On 12 May 2014 20:34, Rory Walsh  wrote:
> Ah, I wasn't sure why you persisting with OSC, but I understand now.
> Sounds like a good plan.
>
> On 12 May 2014 20:25, fauveboy  wrote:
>> I was trying to use Pd as a substitute for the monome atm until I had a
>> csound script to work how I needed then I was going to work towards the
>> Monome directly talking to Csound on the raspberry pi headless eventually...
>> The goal is to eventually have the Monome launch and modulate samples in the
>> most efficient way I can work out, hence csound as I was under the
>> impression it has the most potential  for this kind of project...one step at
>> a time.
>>
>>
>>
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735154.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>>
>>

Date2014-05-12 22:23
FromMartin Peach
SubjectRe: [Csnd] Re: OSC control (Pitch)
I think the Pd part should go like this:

[slider] [slider]
|         |
|        [t b f]
|         /   |
|        /    |
|       /     |
|      /      |
|     /       |
|    /        |
|   /         |
|  /          |
| /           |
[pack 0 0      ]
|
[/controls $1 $12(
|
[packOSC]
|
[udpsend]


Martin

On 2014-05-12 12:15, fauveboy wrote:
> It does help thank you very much for your support here, Im hoping once I
> understand how to get a second parameter working Ill manage to make some
> progress without being so reliant, so I hope Im not such a bother...
> I've tried a few variations with the addresses and have left it where I am
> in the screen shot. I've asked on the Pd forum because Im guessing its still
> something I Screen_Shot_2014-05-12_at_17.png
> 
> m not doing in the Pd patch perhaps?
> I hope you don't mind taking another look?
> Thanks again!
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735145.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>
>
>


Date2014-05-13 11:45
Fromfauveboy
Subject[Csnd] Re: OSC control (Pitch)
Thanks Martin, I've uploaded another screen shot. Its not making a sound yet
but Pd's saying "pack_symbol:wrong type"does that mean I have to find some
other object to rely the data?
And I'll make a new monome/RPI/csound thread I think Rory, good idea :D
Screen_Shot_2014-05-13_at_11.png
  



--
View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735205.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-05-13 15:49
FromMartin Peach
SubjectRe: [Csnd] Re: OSC control (Pitch)
On 2014-05-13 06:45, fauveboy wrote:
> Thanks Martin, I've uploaded another screen shot. Its not making a sound yet
> but Pd's saying "pack_symbol:wrong type"does that mean I have to find some
> other object to rely the data?


[pack OSC] should be one word: [packOSC]. Also [udp send] is one word 
[udpsend] and it should replace [sendOSC] in your patch.

Martin


> And I'll make a new monome/RPI/csound thread I think Rory, good idea :D
> Screen_Shot_2014-05-13_at_11.png
> 
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735205.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>
>
>


Date2014-05-14 16:33
Fromfauveboy
Subject[Csnd] Re: OSC control (Pitch)
I wondered if it was that Put Pd denied the objects and so there're just the
red boxes?  Screen_Shot_2014-05-14_at_16.png
  



--
View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735243.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-05-14 17:30
FromRory Walsh
SubjectRe: [Csnd] Re: OSC control (Pitch)
I'm not 100% but I think packOSC is an abstraction. You may need to
set the path to it. I'm sure Martin can confirm.

On 14 May 2014 16:33, fauveboy  wrote:
> I wondered if it was that Put Pd denied the objects and so there're just the
> red boxes?  Screen_Shot_2014-05-14_at_16.png
> 
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735243.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>

Date2014-05-14 17:35
FromMartin Peach
SubjectRe: [Csnd] Re: OSC control (Pitch)
On 2014-05-14 11:33, fauveboy wrote:
> I wondered if it was that Put Pd denied the objects and so there're just the
> red boxes?  Screen_Shot_2014-05-14_at_16.png
> 

That is correct. You need to add a [import net] and [import osc] to the 
patch and reload it. (I'm assuming you're running pd-extended, otherwise 
it's not going to work, as those two objects aren't part of vanilla Pd.)

Martin


Date2014-05-15 17:55
Fromfauveboy
Subject[Csnd] Re: OSC control (Pitch)
Ah fantastic it works! :) Thank you Martin. I didn't realise import OSC and
import Net as just exciting objects (no patch cords or anything) are
importing libraries for it to work?



--
View this message in context: http://csound.1045644.n5.nabble.com/OSC-control-Pitch-tp5735054p5735283.html
Sent from the Csound - General mailing list archive at Nabble.com.