--- Frank Barknecht fbar@footils.org wrote: > Hallo,
Claudius Maximus hat gesagt: // Claudius Maximus wrote:
- [block~ 1] doesn't work
The block size is set to 64 instead. Moreover:
block~ can not be used in the patch with the adc~/dac~, you need a subpatch then. Block also does not change the lowest message speed in objects like [del], which is limited below by 64 samples.
Is there a list of objects which do not behave in a continuous way as you decrease the block size below 64? I'd hate to run into trouble again when I least expect it. Perhaps [bang~] or [timer] are some of these objects, which would break the [block~ 1] tests I detailed below.
- How do I read bytes from a binary file into an
array?
Treating them as integers from 0 to 255.
I don't know an object that opens files in bin-mode, but it could be written as an external.
I do not have a Windows C compiler. I need to investigate whether there are any freely available, can you recommend one?
- How do I build messages out of symbol
arguments?
|set $1( doesn't work as expected when I send it
a
symbol.
What did you expect it to work like?
Well, as I describe below it wasn't a symbol I was sending it anyway, but an identifier. I expected it to replace $1 with the identifier name that was input.
- How do I send messages to $0-name arrays?
|;$0-name x y z( doesn't work.
There is no $0 in messages, you just invented this. ;) To send to local variable, need to make a message that accepts a variable:
[; $1-name x y z(
and send $0 as first argument to that:
[f $0] | | [; $1-name x y z(
you also could use [symbol $0-name] directly. Example attached.
Many thanks, that's exactly what I needed.
Frank Barknecht _
--- zmoelnig@iem.at wrote:
Zitiere Claudius Maximus
gloriousclaudiusmaximus@yahoo.co.uk:
- [block~ 1] doesn't work
it does. (at least in pd-0.36; i'll have to make the pc i am sitting at compile first, before i can try 0.37)
The block size is set to 64 instead. Moreover:
how do you know ? i tested it with [pack~].
I tried 3 methods of getting [block ~1] to work, all failed.
1: block1test1.pd Window with a [block~ 1] and objects to display the block size. Doesn't work, block size is actually 64.
2: block1test2.pd Window with a [pd ...] subpatch, subpatch contains a [block~ 1] and objects to display the block size. Doesn't work, block size is actually 64.
3: block1test3a.pd, block1test3b.pd 3a is a window with a [block1test3b] use of an abstraction and a number box to display the block size coming from the outlet. 3b is a window with a [block~ 1] and objects to display the block size, together with an outlet outputting the block size. Doesn't work, block size is actually 64.
I first noticed this bug trying to output audio (sound was way lower in pitch than it should have been with mid-freq aliasing noise), but I've since modified those patches to use a workaround so I'm afraid I can't post them here.
C:>pd -blocksize 1
i don't think that this is a working setting. pd's dac/adc-blocksize used to be somewhat hardcoded to 64 samples (but this might have changed with 0.37; i'm a little bit behind in that matters) and of course your soundcard/driver would have to support such small blocksizes.
I see. A friendly error message would have been nicer ;-)
- How do I read bytes from a binary file into an
array?
Treating them as integers from 0 to 255.
there was something like [read16 /path/to/my/file.dat(
I guess I could use [soundfiler] to read the data as a raw 8-bit sound file, and then calculate the real byte values. Not very elegant though ;-)
- How do I build messages out of symbol
arguments?
|set $1( doesn't work as expected when I send it
a
symbol.
depends on what you expect. you might argue, that when setting a message with [set $1( where $1 is a symbol the set message should output a symbol when banged/clicked. However you easily acchieve this by using [set symbol $1(.
It is often quite hard to distinguish between "symbols" and so called anythings , especially for newbies. There is really a difference between [hallo( (being an identifier "hallo") and [symbol hallo( (being the symbol (identified by "symbol") "hallo")
I think I understand now: [sawtooth( is sent as an identifier rather than a symbol, so I need to put it through a [symbol] object to turn it into a real symbol. After that, routing it into a [set $1( works as I expected, outputting "set sawtooth". As a diagram:
[sawtooth( | | "sawtooth" | [symbol] | | "symbol sawtooth" | [set $1( | | "set sawtooth" v
- How do I send messages to $0-name arrays?
|;$0-name x y z( doesn't work.
to send something to your array named "$0-name" use:
[x y z( | [send $0-name]
Thanks, I've got that working :)
mfg.as.dr IOhannes
What I am trying to do is create an oscillator with switchable waveforms, and the ability to synchronize the oscillators (osc2 restarts when osc1 restarts, need better resolution than 64 samples for this).
I want the subpatch to be able to receive messages like [waveform square( or [waveform sawtooth(, which it converts to messages like [set X( where X is the name of a local array like $0-sawtooth or $0-square. The [set X( message is then
sent to a [tabosc4~]. See symboltest1*.pd - it uses $1 from the abstraction arguments because $0 was invisible and I wanted to see what was happening).
I was doing it wrong when I first tried, but now I think I've found a bug in the message box:
[set $1 $2( -> "set aardvark sawtooth" when I feed it a pair of symbols "aardvark sawtooth". But when I try to put a "-" instead of the space between the variables:
[set $1-$2( -> "set aardvark-$2" instead of "set aardvark-sawtooth". A problem.
Are there prizes awarded for finding bugs? I would like my prize to be an umbrella - I need to go to the post office but it's raining.
A solution to the waveform selection problem is:
[route sawtooth square ...]
| | ... |
|
[trigger bang]
|
|
[symbol $0-sawtooth]
|
|
[set $1(
|
|
[whatever wants to read the array]
which would mean more work when adding new waveforms (need to create new waveform array, modify route and create a new trigger-symbol-message trio, instead of just creating the new waveform array), but has the advantage that I can add a sensible error message for unrecognised waveform names.
Many thanks to both of you for your swift and helpful replies.
http://www.claudiusmaximus.tk Each unsolicited commercial email received is subject to a US$50 handling fee.
Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk
Hallo, Claudius Maximus hat gesagt: // Claudius Maximus wrote:
Is there a list of objects which do not behave in a continuous way as you decrease the block size below 64?
I *think*, but I'm not that sure and cannot test currently, that all message passing is limited to the 64 samples minimum. To get faster, you will need to resort to signal connections or the time tagged triggers from iemlib.
I don't know an object that opens files in bin-mode, but it could be written as an external.
I do not have a Windows C compiler. I need to investigate whether there are any freely available, can you recommend one?
I don't have a Windows C compiler, too. I don't even have Windows. :) Now, I think, that only Visual C++ from MS is able to compile Pd on Windows. This might not be valid for externals, though.
[set $1 $2( -> "set aardvark sawtooth" when I feed it a pair of symbols "aardvark sawtooth". But when I try to put a "-" instead of the space between the variables:
[set $1-$2( -> "set aardvark-$2" instead of "set aardvark-sawtooth". A problem.
Are there prizes awarded for finding bugs? I would like my prize to be an umbrella - I need to go to the post office but it's raining.
No umbrella, sorry: $x only works if it's at the begining of the identifier. So $x-name is okay, name-$x is not.
A solution to the waveform selection problem is:
[route sawtooth square ...] | | ... |
| [trigger bang] | | [symbol $0-sawtooth] | | [set $1( | | [whatever wants to read the array]
Here's an alternative:
[inlet]
|
[symbol]
|
[select sawtooth square ...]
| | ... |
|
[set $1( [ print Unknown_Waveform]
|
|
[whatever wants to read the array]
Another thing to think about here, is if it is possible to put all common behaviour into an abstraction. If most of the sound generation seems to be the same, except the different table contents, you might want to put the table content into a file ( tablename write/read somename.txt) and use an abstraction argument to select the waveform file.
Just a suggestion.
Frank Barknecht _ ______footils.org__
On Wednesday, Oct 22, 2003, at 13:11 America/New_York, Frank Barknecht
wrote:
Hallo, Claudius Maximus hat gesagt: // Claudius Maximus wrote:
Is there a list of objects which do not behave in a continuous way as you decrease the block size below 64?
I *think*, but I'm not that sure and cannot test currently, that all message passing is limited to the 64 samples minimum. To get faster, you will need to resort to signal connections or the time tagged triggers from iemlib.
I don't know an object that opens files in bin-mode, but it could be written as an external.
I do not have a Windows C compiler. I need to investigate whether there are any freely available, can you recommend one?
I don't have a Windows C compiler, too. I don't even have Windows. :) Now, I think, that only Visual C++ from MS is able to compile Pd on Windows. This might not be valid for externals, though.
There are two free compiler setups for Windows that I know of, both
based on gcc. http://MinGW.org and http://cygwin.org. MinGW aims to
me more Windows-like, and Cygwin aims to be UNIX on top of Windows.
Cygwin is better supported and more complete, but its downside is that
you need the cygwin.dll to run programs, and they behave somewhat
UNIX-like.
I have started trying to port parts of Pd to MinGW. It would be great
if ultimately all of Pd would compile in MinGW so that Windows devs
would have to buy (or ahem, "buy") a compiler.
.hc
[set $1 $2( -> "set aardvark sawtooth" when I feed it a pair of symbols "aardvark sawtooth". But when I try to put a "-" instead of the space between the variables:
[set $1-$2( -> "set aardvark-$2" instead of "set aardvark-sawtooth". A problem.
Are there prizes awarded for finding bugs? I would like my prize to be an umbrella - I need to go to the post office but it's raining.
No umbrella, sorry: $x only works if it's at the begining of the identifier. So $x-name is okay, name-$x is not.
A solution to the waveform selection problem is:
[route sawtooth square ...] | | ... | | [trigger bang] | | [symbol $0-sawtooth] | | [set $1( | | [whatever wants to read the array]
Here's an alternative:
[inlet] | [symbol] | [select sawtooth square ...] | | ... | | [set $1( [ print Unknown_Waveform] | | [whatever wants to read the array]
Another thing to think about here, is if it is possible to put all common behaviour into an abstraction. If most of the sound generation seems to be the same, except the different table contents, you might want to put the table content into a file ( tablename write/read somename.txt) and use an abstraction argument to select the waveform file.
Just a suggestion.
ciao
Frank Barknecht _ ______footils.org__
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
There is no way to peace, peace is the way.
-A.J. Muste
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
I have started trying to port parts of Pd to MinGW. It would be great
if ultimately all of Pd would compile in MinGW so that Windows devs
would have to buy (or ahem, "buy") a compiler.
"would not"?
That would be great, as I do have acces to windows machines, of course, but I cannot and don't want to install expensive or software that I, ahem, "buyed" there, to compile my externals for other users.
Frank Barknecht _ ______footils.org__
Frank Barknecht schrieb:
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
I have started trying to port parts of Pd to MinGW. It would be great if ultimately all of Pd would compile in MinGW so that Windows devs would have to buy (or ahem, "buy") a compiler.
"would not"?
That would be great, as I do have acces to windows machines, of course, but I cannot and don't want to install expensive or software that I, ahem, "buyed" there, to compile my externals for other users.
You could try Microsoft .NET Framework SDK which is free (!) and can be downloaded somewhere on the Microsoft web site.... I haven't tried it since I have VC++ but it is said to include everything one needs to compile ones own software. Not shure whether this is a joke!?
See here:
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/netdevfram...
http://www.microsoft.com/downloads/details.aspx?FamilyId=9B3A2CA6-3647-4070-...
On http://www.thefreecountry.com/compilers/cpp.shtml is says:
"Unbelievably, the Microsoft Visual C/C++ command line compiler, along with C#, VB.NET and JScript.NET, appears to be available from Microsoft for download for free. (Note that if you use the Opera web browser to go to this URL, set Opera to pretend that it is Mozilla (just hit F12 and select Mozilla 5.0), otherwise Microsoft's web server will redirect you to a dummy page. Their browser detection script, which serves different pages to different browsers, is broken.) You will also need to download the Microsoft Platform SDK which contains the Windows headers and libraries for the compilers. The command line compiler is the same one that comes with the commercial Visual C++ Standard, which means that it does not have an optimizer (or at least, not the optimizer that ships with the Professional version that comes with MSDN)."
Olaf
On Thursday, Oct 23, 2003, at 06:09 America/New_York, Olaf Matthes
wrote:
Frank Barknecht schrieb:
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
I have started trying to port parts of Pd to MinGW. It would be
great if ultimately all of Pd would compile in MinGW so that Windows devs would have to buy (or ahem, "buy") a compiler."would not"?
correct.
That would be great, as I do have acces to windows machines, of course, but I cannot and don't want to install expensive or software that I, ahem, "buyed" there, to compile my externals for other users.
You could try Microsoft .NET Framework SDK which is free (!) and can be downloaded somewhere on the Microsoft web site.... I haven't tried it since I have VC++ but it is said to include everything one needs to compile ones own software. Not shure whether this is a joke!?
See here:
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/ netdevframework.asp
http://www.microsoft.com/downloads/details.aspx?FamilyId=9B3A2CA6- 3647-4070-9F41-A333C6B9181D&displaylang=en
On http://www.thefreecountry.com/compilers/cpp.shtml is says:
"Unbelievably, the Microsoft Visual C/C++ command line compiler, along with C#, VB.NET and JScript.NET, appears to be available from Microsoft for download for free. (Note that if you use the Opera web browser to
go to this URL, set Opera to pretend that it is Mozilla (just hit F12 and select Mozilla 5.0), otherwise Microsoft's web server will redirect you to a dummy page. Their browser detection script, which serves different pages to different browsers, is broken.) You will also need to download the Microsoft Platform SDK which contains the Windows headers and libraries for the compilers. The command line compiler is the same one that comes with the commercial Visual C++ Standard, which means that it does not have an optimizer (or at least, not the optimizer that ships with the Professional version that comes with MSDN)."
Hmm, so a free version of MS's compiler sounds alright, but a
non-optimizing compiler does not. The Cygwin route would be cool
because a Linux machine could build binaries by cross compiling, so the
building of the Windows installer could happen automatically on the
same machine that built the RPMs, DEBs, etc. MinGW makes the
experience more Windows-like, which is probably the best options.
.hc
"[W]e have invented the technology to eliminate scarcity, but we are
deliberately throwing it away
to benefit those who profit from scarcity."
-John Gilmore
a trick i use for doing sample-level prototypes (normally you would always be better off making an external) is to use a [bang~] connected to a [64(->[until]->[counter] (where counter is the common [f ]x[+ 1] arrangement). you then use the output of the counter as an index into a 64 sample array, which is being played using [tabreceive~]. don't forget to zero the counter at each frame too.
another way is to use the [pack~]->[repack 1] and [unpack~] objects from zexy to get hold of the sample data as a sequence of float messages (do your work between the repack and unpack).
pix.
On Wed, 22 Oct 2003 19:11:48 +0200 Frank Barknecht fbar@footils.org wrote:
Hallo, Claudius Maximus hat gesagt: // Claudius Maximus wrote:
Is there a list of objects which do not behave in a continuous way as you decrease the block size below 64?
I *think*, but I'm not that sure and cannot test currently, that all message passing is limited to the 64 samples minimum. To get faster, you will need to resort to signal connections or the time tagged triggers from iemlib.
I don't know an object that opens files in bin-mode, but it could be written as an external.
I do not have a Windows C compiler. I need to investigate whether there are any freely available, can you recommend one?
I don't have a Windows C compiler, too. I don't even have Windows. :) Now, I think, that only Visual C++ from MS is able to compile Pd on Windows. This might not be valid for externals, though.
[set $1 $2( -> "set aardvark sawtooth" when I feed it a pair of symbols "aardvark sawtooth". But when I try to put a "-" instead of the space between the variables:
[set $1-$2( -> "set aardvark-$2" instead of "set aardvark-sawtooth". A problem.
Are there prizes awarded for finding bugs? I would like my prize to be an umbrella - I need to go to the post office but it's raining.
No umbrella, sorry: $x only works if it's at the begining of the identifier. So $x-name is okay, name-$x is not.
A solution to the waveform selection problem is:
[route sawtooth square ...] | | ... |
| [trigger bang] | | [symbol $0-sawtooth] | | [set $1( | | [whatever wants to read the array]Here's an alternative:
[inlet] | [symbol] | [select sawtooth square ...] | | ... |
| [set $1( [ print Unknown_Waveform] | | [whatever wants to read the array]Another thing to think about here, is if it is possible to put all common behaviour into an abstraction. If most of the sound generation seems to be the same, except the different table contents, you might want to put the table content into a file ( tablename write/read somename.txt) and use an abstraction argument to select the waveform file.
Just a suggestion.
ciao
Frank Barknecht _ ______footils.org__
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list