Pd sound editor 0.0.1
ok, new problem... this is what it is telling me when i try to do an attachment:
"Fatal error: Call to undefined function attach_find_extention() in /public_html/puredata/include/attach/attach_func.php on line 111"
nuts... and i am doing the preview, followed by re-selecting the file to upload. this is frustrating.
Arduino and pure data
Hello. I'm trying to use Arduino with Puredata using the Firmata Library. I downloaded Firmata and installed the library as instructed in the readme, and then loaded 'AnalogFirmata' from the library examples. When I try to compile this example (or any of the others) I receive a string of error statements. Code and errors listed below. Any suggestions?
Code:
/* This firmware supports as many analog ports as possible, all analog inputs,
* four PWM outputs, and two with servo support.
*
* This example code is in the public domain.
*/
#include <Firmata.h>
#include <Servo.h>
/*==============================================================================
* GLOBAL VARIABLES
*============================================================================*/
/* servos */
Servo servo9, servo10; // one instance per pin
/* analog inputs */
int analogInputsToReport = 0; // bitwise array to store pin reporting
int analogPin = 0; // counter for reading analog pins
/* timer variables */
extern volatile unsigned long timer0_overflow_count; // timer0 from wiring.c
unsigned long nextExecuteTime; // for comparison with timer0_overflow_count
/*==============================================================================
* FUNCTIONS
*============================================================================*/
void analogWriteCallback(byte pin, int value)
{
switch(pin) {
case 9: servo9.write(value); break;
case 10: servo10.write(value); break;
case 3:
case 5:
case 6:
case 11: // PWM pins
analogWrite(pin, value);
break;
}
}
// -----------------------------------------------------------------------------
// sets bits in a bit array (int) to toggle the reporting of the analogIns
void reportAnalogCallback(byte pin, int value)
{
if(value == 0) {
analogInputsToReport = analogInputsToReport &~ (1 << pin);
}
else { // everything but 0 enables reporting of that pin
analogInputsToReport = analogInputsToReport | (1 << pin);
}
// TODO: save status to EEPROM here, if changed
}
/*==============================================================================
* SETUP()
*============================================================================*/
void setup()
{
Firmata.setFirmwareVersion(0, 2);
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
Firmata.attach(REPORT_ANALOG, reportAnalogCallback);
servo9.attach(9);
servo10.attach(10);
Firmata.begin();
}
/*==============================================================================
* LOOP()
*============================================================================*/
void loop()
{
while(Firmata.available())
Firmata.processInput();
if(timer0_overflow_count > nextExecuteTime) {
nextExecuteTime = timer0_overflow_count + 19; // run this every 20ms
for(analogPin=0;analogPin<TOTAL_ANALOG_PINS;analogPin++) {
if( analogInputsToReport & (1 << analogPin) )
Firmata.sendAnalog(analogPin, analogRead(analogPin));
}
}
}
Error Statements:
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:61: error: typedef 'callbackFunction' is initialized (use __typeof__ instead)
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:61: error: 'byte' was not declared in this scope
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:61: error: expected primary-expression before 'int'
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:64: error: typedef 'sysexCallbackFunction' is initialized (use __typeof__ instead)
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:64: error: 'byte' was not declared in this scope
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:64: error: 'byte' was not declared in this scope
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:64: error: 'byte' was not declared in this scope
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:64: error: 'argv' was not declared in this scope
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:81: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:81: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:86: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:87: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:88: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:90: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:91: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:91: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:91: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:95: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:95: error: 'callbackFunction' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:96: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:97: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:98: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:98: error: 'sysexCallbackFunction' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:98: error: 'void FirmataClass::attach(int, int)' cannot be overloaded
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:95: error: with 'void FirmataClass::attach(int, int)'
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:99: error: 'byte' has not been declared
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:104: error: 'byte' does not name a type
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:105: error: ISO C++ forbids declaration of 'byte' with no type
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:105: error: expected ';' before '*' token
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:107: error: 'byte' does not name a type
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:108: error: 'byte' does not name a type
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:109: error: 'byte' does not name a type
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:110: error: 'byte' does not name a type
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:112: error: 'boolean' does not name a type
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:115: error: 'callbackFunction' does not name a type
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:116: error: 'callbackFunction' does not name a type
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:117: error: 'callbackFunction' does not name a type
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:118: error: 'callbackFunction' does not name a type
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:119: error: 'callbackFunction' does not name a type
/Applications/arduino-0012/hardware/libraries/Firmata/Firmata.h:122: error: 'sysexCallbackFunction' does not name a type
In function 'void setup()':
Couldn't create under \*nix :(
Hi all!
I'll use this first message to introduce myself to this forum and to ask for some noob-help
I'm Zoten, from Italy, and I'm studying computer science at Udine university.
A little time ago I've been get started with pd and data-flow programming for a little project, that I've just decided to enlarge.
So, my aim is now to make some interaction between some c++/qt application and PureData by LAN/web, but the problem is muuuuch before.
I'm an open source supporter, so I decided to make all under free OSs.
So, here's the problem:
I've got two stations, that I (want to) use to try my programs in real situation.
Station one comes with Sabayon 3.5 as OS, Pd compiled from sources, and station two with Ubuntu 8.04 (Hardy), Pd installed by GUI, but the problem is the same: I open my old project (a simple client/server synth that I want to use, between the others, to sniff some packets) and it starts to give error messages like
sendOSC
..couldn't create
OSCroute /adsr
..couldn't create
and so on.
If I try to send something via web it comes with an error,
error: inlet: expected '' but got 'send'.
Searching the forum for similar issues, I tried installing pd-extended on the 'buntu machine, but the problem, if possible, degenerated, with more "couldn't create" issues.
On Windows XP SP2 the project seems to work, so I can easily say that it is some installation-path-lib problem.
Anyone has any idea?
Fade in fade out
@lewis said:
Hey, I guess it didn't work cause i don't see no attachments.
for some reason every time i try to attach just the file it doesn't work it comes up with an error screen
but then if i turn around and compress it then it works just fine i would be more than happy to get it to you another way
and again im sorry its taken this long
email or like soundforge maybe?
Paul
PS
i just tried to post and this is the error i got
Fatal error: Call to undefined function: attach_find_extention() in /home/local/apache/htdocs/sites/h/hurleur.com/puredata/include/attach/attach_func.php on line 111
Patch distortion in widescreen monitors?
Hello!
Does anyone know how to fix the appearance of Pd main window and patches when using a widescreen monitor? My fonts look horizontally stretched and objects and comments that usually appear fine do collide with this monitor (see images attached). All other programs look the same as they would in a 4x3 monitor. I thought it would have something to do with the file /usr/lib/pd/bin/pd.tk (also attached), I've tried to remove all -bold ocurrences within it, it looked slightly better, but still cluttered.
I use Pd 0.39-2 within Kubuntu (Edgy release). I have ttf-bitstream-vera and ttf-dejavu installed.
Thanks in advance!
Sample Player
Frank told me to make this tutorial to figure out
http://lists.puredata.info/pipermail/pd-list/attachments/20070528/967bc319/attachment-0001.bin
Thanks for his help.
If anybody has the same problem. Here is the message he wrote me:
> I have some newbie questions about Pd. I wanted to write a Patch
> which is based on this one (maybe):
> http://puredata.hurleur.com/sujet-643-sample-player
> The mentioned Sample Player has 2 Sliders which control the Start-/
> End-Loop position which is the exact thing what i was looking for.Attached is a slightly different sampler, actually not a sampler
itself, but a tutorial on how to build your own sampler.> What i want to do:
> I want to make a patch, a sample player. When i press a button i want
> to loop the actual sample position according to the key i have pressed.
>
> I give you an example. I load a loop which is 120 BPM fast. I set
> somewhere my tempo. When i press "a" it starts looping 1/4th at the
> actual play position.
>
> For this sort of thing. The Sample Player seems to be perfect. But
> now there are the difficulties.
>
> - How can i set the tempo right? I figured out how to calculate the
> tempo for any note length.If you work through attached tutorial, maybe some of the neccessary
calculations (as: duration(smps) => duration(msec) etc.) become clearer.> - How can i get my keyboard entries into the software?
Use the [keyname] or [key] objects.
> - And lust but not least. How can i get the Patch to act how i would
> like.Just build it! If you get stuck, try to make a patch that illustrates
where you got stuck and send it here.You may want to start with empty subpatches, that divide your
problem/approach into smaller problems/steps. Like first do a
completely empty patch and put some empty subpatches in there:[pd load_file]
[pd get_duration_in_msec]
[pd convert_duration_to_BPM]
[pd get_keypresses]
[pd play_sample]
or similar. Then give your subpatches inlets and outlets and connect
them in order. And last fill in these subpatches with the real patches
one by one, always checking if every subpatch does what it should do.> I know...dumb question you know too.
It's not a dumb question at all. While playing samples isn't exactly
magic, it's also not trivial to do, especially for the first time.
Proximity interaction in PD
I am new to PD so this may be a simple question. Is there a patch or a way to have two gemobjects attached to sound generators/modifiers interact with each other in reference to their proximity from each other? In simple terms. Basically have 1 gemobject be attached to a loadbang and a 2nd gemobject be attached to a metro and as gemobject1 gets a certain distance from gemobject2 the loadbangs outlet attaches to the metros inlet. I have been driving myself crazy trying to figure this out in PD. I think it might have something to do with pmpd but I cant figure it out. Something similar to the reactable. Any help would be appreciated.
Thanks,
Alain
Loopback devices, virtual audio devices?
i'm looking for a free solution too. i don't think my original idea is going to work out because i don't have the time to implement it. maybe some of you have ideas for the problem i am trying to solve.
the problem is this:
i am helping a professor with some research. for his research he is doing a case study on 3 composers. he is asking them to record a narrative of there thoughts on the composition process as they compose. for this, the composers will be working an a mac studio workstation putting the composition together in logic. a second computer, a pc , running audacity will be used to record there sounds. when the composer reaches what they consider a significant change in the program, we are asking them to save their project to a new file (so we end up with a series of files showing the various stages of the composition). we would like a way, however, to map the timestamps of those files to the 'timeline' of their narrative.
here are a few solutions that are not exactly desirable:
a. do not stop the recording at all and make a note of what time the recording started. this means that you can calculate what time speech is taking place by adding the number of minutes and seconds (and hours) to the time at which the recording started. the problem with this is that it will yield very large files which are not very practical, especially considering that we have to transcribe these files.
b. have the composers start each segment of narration with a timestamp: "it is now 9:15 on tuesday...." as part of the research methodology, this creates problems with the flow of a more natural narrative of the compositional process.
c. have the composers save each segment of narration as a seperate time-stamped file. the problem here is that this takes more time, and could create a lot of files that would be very annoying to work with when it comes to transcribing.
c. my idea was to have, instead of just input from the microphone, 2 streams of audio input,one on the left channel and one on the right channel. on the left, would be the recorded narrative. on the right, would be an audio signal that encodes a time stamp. i was think of simply convert a number such as DDMMHHMM (day, month, hour, minute) into DTMF tones. these could then be translated back into a timestamp. an 8-tone dtmf sequence would be generated every 10 seconds or so. this way, as long as the narrative segment was longer than 10 seconds, it would contain a timestamp. the problem with this is that i have no way to mix such a signal with the input from the microphone.
any suggestions would be greatly appreciated. thanks.
Compiling for x86\_64
The only problem i have so far (and it is a big one) is that it isn't reading the example files (bells, voice, and voice2) because it says they have malformed headers or something. I hope its just the files and not the program itself,
Unfortunately this is very likely a problem with the program. Different processors expect different alignment of words in memory. For example, if you declare a C data structure of { int32, int8, int32 } and one processor A expects int32's to be on 16bit boundaries and another processor Bexpects int32's to be on 32bit boundaries, the C data structure will be represented in memory differently:
A: { int32, int8, pad8, int32 }
B: { int32, int8, pad8, pad8, pad8, int32 }
The padding is just empty space to align the data on the correct word boundaries.
The problem occurs when the program's assumptions of data layout in memory do not match what the compiler does, and instead of reading a file format word by word and populating the data structure, reads a chunk of data and assumes that it matches the data format in memory.
Compare this with problems transferring data between big-endian and little-endian machines - you have to translate to and from the file format, not assume that the data in the file will match the data in memory for all architectures.