Difference between \freq vs. \ffreq


#1

Hi,

I am wondering what is the difference between \freq and \ffreq by Pbinds.

Thanx


#2

Hi,

a Pbind can be written with freely chosen keys. However there’s a refined mechanism of value conversions regarding time and duration which relies on certain keywords and ‘freq’ is one of them, see the bottom of Event’s help file.

http://doc.sccode.org/Classes/Event.html#Useful%20keys%20for%20notes

E.g. for pitched instruments it’s a good convention to define a SynthDef with an argument named ‘freq’. Then you can e.g. use ‘midinote’ , ‘note’ or ‘degree’ etc. in your Pbind and after an automatic conversion for every Event a message with the corresponding value to be assigned to the synth’s ‘freq’ is sent to the server.

Sometimes you might want to have other SynthDef frequency args, e.g. for modulation. ‘ffreq’ could stem from an example with such a situation.

It is also common practice to use ‘extra’ key value pairs in a Pbind for intermediate results, not much sense here, but you can e.g. do

p = Pbind(
	\ffreq, Pwhite(1, 500),  // default instrument doesn't have an arg 'ffreq', so no problem to use this key
	\freq, Pkey(\ffreq) + 500 // default instrument has key 'freq'
).trace.play

p.stop

#3

Thank you dkmayer, so we can say \ffreq is just an arbitrary key name and has no additional meaning or functioning, right?


#4

This is correct, afaik there’s no complete collection of dedicated Event keywords, but you can check Event’s helpfile as well as snoop Event.sc


#5

I see. Thank you very much!


#6

http://doc.sccode.org/Tutorials/A-Practical-Guide/PG_07_Value_Conversions.html

http://doc.sccode.org/Tutorials/A-Practical-Guide/PG_08_Event_Types_and_Parameters.html

hjh