From c.mcclelland at qub.ac.uk Wed Apr 6 06:15:44 2005 From: c.mcclelland at qub.ac.uk (Christopher McClelland) Date: Wed, 6 Apr 2005 14:15:44 +0100 Subject: [CM] [ANN] Sonorities Message-ID: <09516d79331b5fbffbdd4633f5c093ff@qub.ac.uk> Sonorities Festival of Contemporary Music 2005 26th April - 4th May 2005 Sonic Arts Research Centre, Belfast The Sonorities Festival is the longest-running new music festival in Ireland and is one of the cornerstone Festivals in Europe presenting innovative new music. The Festival has always brought to Northern Ireland innovative ideas and sounds from across the world and the 2005 Festival is no exception in this regard. For 2005 we present the work of artists who deliberately explore the space in between established cultural forms. The festival explores the diversity of technological arts, which better than any other, reflect the micro-cultures that characterise our society. We are proud to present a programme that showcases the variety of artistic practice at the beginning of the 21st Century. Luc Ferrari and Frank Zappa are two of the most thought-provoking and controversial musicians of the last one hundred years. Zappa's You Call That Music?, (incidentally not presented at this festival) is a work of experimental music situated in a rock concert context. Zappa's typically adept title summarises the importance of how an artist can place his or her work in order to question cultural norms that are associated with particular types of art practice. Luc Ferrari's visit to Sonorities celebrates the work of the electronic music pioneer who has constantly challenged genres and pre-defined music cultures. Ferrari's playful and ironic approach to music-making provides an alternative perspective on modernity and on the role of music in contemporary society. In a celebration of modes of creativity which go beyond the definitions of music, visual and performance arts, this year?s festival features: Ensemble Proxima Centauri (France) with UK and World Premieres of works by Hespos, Talla, Leroux, Havel and Aperghis [26th April] and especially commissioned audio-visual work by SARC?s composer in residence Sebastian Castagna [27th April] New work with live-electronics with Pianist Maki Namekawa (Germany) [26th April] Renzo Spiteri (Malta), Iain McCurdy and Michael Alcorn (UK) with Found Objects and Live-electronics [28th April] A celebration of electronic music pioneer Luc Ferrari (France) with a unique orchestral performance of En un tournement d'amour [27th April], and an evening of Sons M?moris? on the 30th April. The Ulster Orchestra performing new works with live-electronics by Ricardo Climent (Spain) and especially commissioned Ed Bennett (UK) [27th April] Audio Visual performance with Paulo Raposo (Portugal) and Murmurists (UK) 28th April Sonorities @ the cathedral quarter (in collaboration with the Cathedral Quarter Arts Festival): A full day of events in venues around the city's cultural district including Fruit Music at St. George's Market, a Lagan boat tour with Martin Parker?s Auto-Route #2, Ulster Orchestra playing the music of Frank Zappa, and a club night of extreme audio-visual work with 8GG (China), Lietterschpich (Israel) and Raffaseder/Parker/H?rbst (UK/Austria) [29th April] John Kenny and Chris Wheeler (UK) with a program of works written for the duo which explore the combination of natural sounds with instruments such as the trombone and the carnyx [30th April] A site specific sound installation for the PLACE Built Environment Centre by sound artist Ed Osborn (US) SHE - Transformations: Vocalist Frances Lynch (UK) with a program of electroacoustic music theatre and the limits of the human voice [1st May] Performances of semi-improvised live-electronic music by Uli Mitzlav and Miguel Pereira and Miso Ensemble (Portugal) [30th April and 2nd May] Sound artist and hardware hacker Nic Colins (US) performing with a range of modified musical instruments [2nd May] Audio Visual performance project UNFAIR (Austria) featuring extreme vocalist Dietmar Bruckmayr [3rd May] Show-reel of audio-visual work by Jo Thomas, Mario Verandi, Germ?n Toro-P?rez, Yasuhiro Morinaga, Paulo Chagas, Mark Pilkington and Hopkinson Other participating artists include: John Young, Jo?o Pedro Oliveira, Albert Ortega, Martin Franklin, Rajmil Fischman, David Berezan, Andrew Czink, Michael Clarke, laut, Christian Eloy, Renzo Spiteri, Martin Parker, Eduardo Miranda, Scott Krejci, Eric Lyon, Annette Vande Gorn, Ludger Br?mmer, Adrian Moore, Ian Stewart, Antonin de Bemels and Gordon Delap, dis.playce, Jason Dixon and Henry Vega, Gavin Morris and Tom Davis, Jonty Harrison, Martin Stig Andersen, Jason Geistweidt, Christopher McClelland, Franziska Schroeder, Frank Ekeberg, Wojciech Kosma, Jonathan Impett, John Bowers, Phil Archer, Cesar Villavicencio, Matt Rogalsky, Ed Kelly, Alexis Perepelycia, Shigeto Wada, Alex Sanders, James Dexter, Nick Melia, Simon Waters, Stefano Scarani, Ireland String Quartet A large number of events take advantage of the unique Sonic Laboratory at the Sonic Arts Research Centre, Queen's University. The centre was officially opened by Karlheinz Stockhausen during Sonorities 2004. The Sonic Laboratory includes arrays of loudspeakers strategically located around, above and below the audience area. Audiences walk out onto a suspended, acoustically transparent floor and experience a multi-dimensional sound world in the centre of a cube. Sonorities counts with the support of the Arts Council Northern Ireland, The Gulbenkian Foundation, Arts Council England, Queen?s University Belfast For full listing and ticket information please check the Sonorities website at http://www.sonorities.co.uk BOX OFFICE TEL: +44 (0)28 9097 4829 FAX: +44 (0)28 9027 4828 EMAIL: sarc at qub.ac.uk Pedro Rebelo Chair, Sonorities -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 6268 bytes Desc: not available URL: From rsegnini at ccrma.Stanford.EDU Thu Apr 7 03:50:33 2005 From: rsegnini at ccrma.Stanford.EDU (Rodrigo Segnini) Date: Thu, 7 Apr 2005 03:50:33 -0700 (PDT) Subject: [CM] plotting from command line with snd Message-ID: Hi all. What would be a general command line instruction to generate a sonogram using snd? By that I mean, no launching of the gui, just dumping the output eps file; something scriptable. If not possible (yet I bet it is), any suggestions on how to do that in linux? Thanks, Rodrigo From wsack at acsu.buffalo.edu Thu Apr 7 07:44:23 2005 From: wsack at acsu.buffalo.edu (Bill Sack) Date: Thu, 07 Apr 2005 10:44:23 -0400 Subject: [CM] snd error: "Wrong type to apply:" Message-ID: <42554747.8090103@acsu.buffalo.edu> hi everyone. in the last couple of versions of snd i've built (7.10, i think, and now 7.12) i've gotten the following error message whenever starting snd while loading dlp's "misc.scm": [10:52:35] Wrong type to apply: ("32 25 4 1" "x c white" " c lightslategrey" ". c black" "o c yellow" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" " " " " " " " " " " " " " ........... " " .ooooooooooo. " " .oooooooooooo..... " " .oooooooooooooooo. " " .................... " " .oooooooooooooooo... " " .oooooooooooooooo.. " " .oooooooooooooooo.. " " .oooooooooooooooo. " " .ooooooooooooooo. " " ................ " " " " " " " " " " " " " "................................") "/usr/local/doc/snd-7/eval-c.scm": (the first line is very long and probably got accordian'd in the mail ...) i can't figure out what it's complaining about, but it doesn't seem to affect the function of the program. i've moved the loading of misc.scm to the bottom of my .snd file so the rest of my options get evaluated, but it's a bit annoying to have to hit the error box every time snd starts. does anyone have an idea of what i can do to solve this? yrs, bill -- _________ Bill Sack wsack(a)acsu.buffalo.edu ---------------------- From k.s.matheussen at notam02.no Thu Apr 7 12:23:10 2005 From: k.s.matheussen at notam02.no (Kjetil Svalastog Matheussen) Date: Thu, 7 Apr 2005 21:23:10 +0200 (CEST) Subject: [CM] snd error: "Wrong type to apply:" In-Reply-To: <20050407190002.16225.35226.Mailman@cm-mail.stanford.edu> References: <20050407190002.16225.35226.Mailman@cm-mail.stanford.edu> Message-ID: Bill Sack: >hi everyone. >in the last couple of versions of snd i've built (7.10, i think, and now >7.12) i've gotten the following error message whenever starting snd >while loading dlp's "misc.scm": > > <-----> > > I bet that the name of the icon "save-as" in the file new-icons.scm is interfering with something else. Try to rename "save-as" in the top of the file "new-icons.scm" as "save-as-button", and replase "save-as" in "new-buttons.scm" with "save-as-button". -- From k.s.matheussen at notam02.no Thu Apr 7 13:06:57 2005 From: k.s.matheussen at notam02.no (Kjetil Svalastog Matheussen) Date: Thu, 7 Apr 2005 22:06:57 +0200 (CEST) Subject: [CM] snd error: "Wrong type to apply:" In-Reply-To: References: <20050407190002.16225.35226.Mailman@cm-mail.stanford.edu> Message-ID: On Thu, 7 Apr 2005, Kjetil Svalastog Matheussen wrote: > > Bill Sack: > >hi everyone. > >in the last couple of versions of snd i've built (7.10, i think, and now > >7.12) i've gotten the following error message whenever starting snd > >while loading dlp's "misc.scm": > > > > > <-----> > > > > > > I bet that the name of the icon "save-as" in the file new-icons.scm is > interfering with something else. > > Try to rename "save-as" in the top of the file "new-icons.scm" as > "save-as-button", and replase "save-as" in "new-buttons.scm" with > "save-as-button". > > > Oops, to quick there. The problem is that the scheme function "open-file" is redefined to be an icon. Heres a patch I think should fix the problem, including similar potensional problems in the future: http://www.notam02.no/~kjetism/iconfix.diff Bill, please apply. :-) -- From cramakri at zkm.de Thu Apr 7 08:01:57 2005 From: cramakri at zkm.de (Chandrasekhar Ramakrishnan) Date: Thu, 7 Apr 2005 17:01:57 +0200 Subject: [CM] snd on MacOS X Message-ID: <427e70b76a7911c3ef349cf7238f9097@zkm.de> Howdy all, I noticed that snd does not quite interact with CoreAudio correctly when it comes to getting information about the number of channels a device supports. The code is good enough to deal with most stereo devices, but it doesn't properly handle many multi-channel devices (including my MOTU 2048). The crux of the problem is that CoreAudio grants driver writers a lot of leeway in how they want to expose their device, but the code in audio.c expects the device to be exposed in only one of the many possible ways. I've rewritten the relevant sections of the MacOS X part of audio.c (and am attaching my modifications here), but I'm still encountering some playback problems when there is a sample rate conversion between the sound file being played and the device. I couldn't quite find the source of the problem, but I'm guessing I know what the source is. I wasn't able to find the main driver loop, but it looks like snd likes to drive devices in a blocking, push-mode, instead of being callback-based. Since CoreAudio is callback-based, there's presumably a sleep somewhere to simulate a blocking system, and the time of this sleep is probably determined by the buffer size. However, when there is an SRC, the sleep time is going to be somewhat off. Is this correct? If so, could someone point me to where this blocking-model simulation happens? Here is the rewritten block of code (oh, yeah -- my changes also require linking to a few additional frameworks: -framework CoreServices -framework AudioUnit -framework AudioToolbox): /* ------------------------------- OSX ----------------------------------------- */ /* this code based primarily on the CoreAudio headers and portaudio pa_mac_core.c, * and to a much lesser extent, coreaudio.pdf and the HAL/Daisy examples. */ /* TODO: make bigger buffers work right -- is it possible to set the audio device buffer size? */ // -framework CoreServices -framework AudioUnit -framework AudioToolbox #ifdef MAC_OSX #define AUDIO_OK 1 /* #include #include */ /* ./System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h */ static char* osx_error(OSStatus err) { if (err == noErr) return("no error"); switch (err) { case kAudioHardwareNoError: return("no error"); break; case kAudioHardwareUnspecifiedError: return("unspecified audio hardware error"); break; case kAudioHardwareNotRunningError: return("audio hardware not running"); break; case kAudioHardwareUnknownPropertyError: return("unknown property"); break; case kAudioHardwareBadPropertySizeError: return("bad property"); break; case kAudioHardwareBadDeviceError: return("bad device"); break; case kAudioHardwareBadStreamError: return("bad stream"); break; case kAudioHardwareIllegalOperationError: return("illegal operation"); break; case kAudioDeviceUnsupportedFormatError: return("unsupported format"); break; case kAudioDevicePermissionsError: return("device permissions error"); break; } return("unknown error"); } char *device_name(AudioDeviceID deviceID, int input_case) { OSStatus err = noErr; UInt32 size = 0, msize = 0, trans = 0, trans_size = 0; char *name = NULL, *mfg = NULL, *full_name = NULL; err = AudioDeviceGetPropertyInfo(deviceID, 0, false, kAudioDevicePropertyDeviceName, &size, NULL); if (err == noErr) err = AudioDeviceGetPropertyInfo(deviceID, 0, false, kAudioDevicePropertyDeviceManufacturer, &msize, NULL); if (err == noErr) { name = (char *)MALLOC(size + 2); err = AudioDeviceGetProperty(deviceID, 0, input_case, kAudioDevicePropertyDeviceName, &size, name); mfg = (char *)MALLOC(msize + 2); err = AudioDeviceGetProperty(deviceID, 0, input_case, kAudioDevicePropertyDeviceManufacturer, &msize, mfg); full_name = (char *)MALLOC(size + msize + 4); #if HAVE_KAUDIODEVICEPROPERTYTRANSPORTTYPE trans_size = sizeof(UInt32); err = AudioDeviceGetProperty(deviceID, 0, input_case, kAudioDevicePropertyTransportType, &trans_size, &trans); if (err != noErr) #endif trans = 0; if (trans == 0) mus_snprintf(full_name, size + msize + 4, "\n %s: %s", mfg, name); else mus_snprintf(full_name, size + msize + 4, "\n %s: %s ('%c%c%c%c')", mfg, name, (char)((trans >> 24) & 0xff), (char)((trans >> 16) & 0xff), (char)((trans >> 8) & 0xff), (char)(trans & 0xff)); FREE(name); FREE(mfg); } return(full_name); } static int max_chans_via_stream_configuration(AudioDeviceID device, bool input_case) { /* apparently MOTU 828 has to be different (this code from portaudio) */ UInt32 size = 0; Boolean writable; OSStatus err = noErr; err = AudioDeviceGetPropertyInfo(device, 0, input_case, kAudioDevicePropertyStreamConfiguration, &size, &writable); if (err == noErr) { AudioBufferList *list; list = (AudioBufferList *)malloc(size); err = AudioDeviceGetProperty(device, 0, input_case, kAudioDevicePropertyStreamConfiguration, &size, list); if (err == noErr) { int chans = 0, i; for (i = 0; i < list->mNumberBuffers; i++) chans += list->mBuffers[i].mNumberChannels; free(list); return(chans); } } return(-1); } static void describe_audio_state_1(void) { OSStatus err = noErr; UInt32 num_devices = 0, msize = 0, size = 0, buffer_size = 0, mute = 0, alive = 0; Float32 vol; int i, j, k; pid_t hogger = 0; AudioDeviceID *devices = NULL; AudioDeviceID device, default_output, default_input; AudioStreamBasicDescription desc; AudioStreamBasicDescription *descs = NULL; int formats = 0, m; bool input_case = false; err = AudioHardwareGetPropertyInfo(kAudioHardwarePropertyDevices, &msize, NULL); if (err != noErr) return; num_devices = msize / sizeof(AudioDeviceID); if (num_devices <= 0) return; devices = (AudioDeviceID *)MALLOC(msize); size = sizeof(AudioDeviceID); err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice, &size, &default_input); if (err != noErr) default_input = 55555555; /* unsigned int -- I want some value that won't happen! */ size = sizeof(AudioDeviceID); err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &size, &default_output); if (err != noErr) default_output = 55555555; err = AudioHardwareGetProperty(kAudioHardwarePropertyDevices, &msize, (void *)devices); mus_snprintf(audio_strbuf, PRINT_BUFFER_SIZE, "found %d audio device%s", (int)num_devices, (num_devices != 1) ? "s" : ""); pprint(audio_strbuf); for (m = 0; m < 2; m++) { for (i = 0; i < num_devices; i++) { device = devices[i]; pprint(device_name(device, input_case)); if (input_case) { if (device == default_input) pprint(" (default input)"); else pprint(" (input)"); } else { if (device == default_output) pprint(" (default output)"); else pprint(" (output)"); } size = sizeof(pid_t); err = AudioDeviceGetProperty(device, 0, input_case, kAudioDevicePropertyHogMode, &size, &hogger); if ((err == noErr) && (hogger >= 0)) { mus_snprintf(audio_strbuf, PRINT_BUFFER_SIZE, " currently owned (exclusively) by process %d", (int)hogger); pprint(audio_strbuf); } size = sizeof(UInt32); err = AudioDeviceGetProperty(device, 0, input_case, kAudioDevicePropertyDeviceIsAlive, &size, &alive); if ((err == noErr) && (alive == 0)) pprint(" disconnected?"); size = sizeof(UInt32); err = AudioDeviceGetProperty(device, 0, input_case, kAudioDevicePropertyBufferSize, &size, &buffer_size); if (err != noErr) buffer_size = 0; size = sizeof(AudioStreamBasicDescription); err = AudioDeviceGetProperty(device, 0, input_case, kAudioDevicePropertyStreamFormat, &size, &desc); if (err == noErr) { int config_chans; unsigned int trans; trans = (unsigned int)(desc.mFormatID); mus_snprintf(audio_strbuf, PRINT_BUFFER_SIZE, "\n srate: %d, chans: %d", (int)(desc.mSampleRate), (int)(desc.mChannelsPerFrame)); pprint(audio_strbuf); config_chans = max_chans_via_stream_configuration(device, input_case); if ((config_chans > 0) && (config_chans != (int)(desc.mChannelsPerFrame))) { mus_snprintf(audio_strbuf, PRINT_BUFFER_SIZE, " (or %d?)", config_chans); pprint(audio_strbuf); } mus_snprintf(audio_strbuf, PRINT_BUFFER_SIZE, ", bits/sample: %d, format: %c%c%c%c", (int)(desc.mBitsPerChannel), (trans >> 24) & 0xff, (trans >> 16) & 0xff, (trans >> 8) & 0xff, trans & 0xff); pprint(audio_strbuf); if (buffer_size > 0) { mus_snprintf(audio_strbuf, PRINT_BUFFER_SIZE, ", buf: %d", (int)buffer_size); pprint(audio_strbuf); } if ((int)(desc.mFormatFlags) != 0) /* assuming "PCM" here */ { int flags; flags = ((int)(desc.mFormatFlags)); pprint("\n flags: "); mus_snprintf(audio_strbuf, PRINT_BUFFER_SIZE, "%s%s%s%s%s%s", (flags & kLinearPCMFormatFlagIsFloat) ? "float " : "", (flags & kLinearPCMFormatFlagIsBigEndian) ? "big-endian " : "", (flags & kLinearPCMFormatFlagIsSignedInteger) ? "signed-int " : "", (flags & kLinearPCMFormatFlagIsPacked) ? "packed " : "", (flags & kLinearPCMFormatFlagIsAlignedHigh) ? "aligned-high " : "", #if HAVE_KLINEARPCMFORMATFLAGISNONINTERLEAVED (flags & kLinearPCMFormatFlagIsNonInterleaved) ? "non-interleaved " : "" #else "" #endif ); pprint(audio_strbuf); } if ((int)(desc.mChannelsPerFrame) > 0) { pprint("\n vols:"); for (j = 0; j <= (int)(desc.mChannelsPerFrame); j++) { size = sizeof(Float32); err = AudioDeviceGetProperty(device, j, input_case, kAudioDevicePropertyVolumeScalar, &size, &vol); if (err == noErr) { mus_snprintf(audio_strbuf, PRINT_BUFFER_SIZE, " %s%.3f", (j == 0) ? "master: " : "", vol); pprint(audio_strbuf); } if (j > 0) { size = sizeof(UInt32); err = AudioDeviceGetProperty(device, j, input_case, kAudioDevicePropertyMute, &size, &mute); if ((err == noErr) && (mute == 1)) { mus_snprintf(audio_strbuf, PRINT_BUFFER_SIZE, " (muted)"); pprint(audio_strbuf); } } } } } size = 0; err = AudioDeviceGetPropertyInfo(device, 0, input_case, kAudioDevicePropertyStreamFormats, &size, NULL); formats = size / sizeof(AudioStreamBasicDescription); if (formats > 1) { descs = (AudioStreamBasicDescription *)CALLOC(formats, sizeof(AudioStreamBasicDescription)); size = formats * sizeof(AudioStreamBasicDescription); err = AudioDeviceGetProperty(device, 0, input_case, kAudioDevicePropertyStreamFormats, &size, descs); if (err == noErr) { mus_snprintf(audio_strbuf, PRINT_BUFFER_SIZE, "\n This device supports %d formats: ", formats); pprint(audio_strbuf); for (k = 0; k < formats; k++) { unsigned int trans; trans = (unsigned int)(descs[k].mFormatID); mus_snprintf(audio_strbuf, PRINT_BUFFER_SIZE, "\n srate: %d, chans: %d, bits/sample: %d, format: %c%c%c%c", (int)(descs[k].mSampleRate), (int)(descs[k].mChannelsPerFrame), (int)(descs[k].mBitsPerChannel), (trans >> 24) & 0xff, (trans >> 16) & 0xff, (trans >> 8) & 0xff, trans & 0xff); pprint(audio_strbuf); } } FREE(descs); } pprint("\n"); } input_case = true; } if (devices) FREE(devices); } #define MAX_BUFS 4 static char **bufs = NULL; static int in_buf = 0, out_buf = 0; /* No longer needed static OSStatus writer(AudioDeviceID inDevice, const AudioTimeStamp *inNow, const AudioBufferList *InputData, const AudioTimeStamp *InputTime, AudioBufferList *OutputData, const AudioTimeStamp *OutputTime, void *appGlobals) { AudioBuffer abuf; char *aplbuf, *sndbuf; abuf = OutputData->mBuffers[0]; aplbuf = (char *)(abuf.mData); sndbuf = bufs[out_buf]; memmove((void *)aplbuf, (void *)sndbuf, abuf.mDataByteSize); out_buf++; if (out_buf >= MAX_BUFS) out_buf = 0; return(noErr); } */ static OSStatus reader(AudioDeviceID inDevice, const AudioTimeStamp *inNow, const AudioBufferList *InputData, const AudioTimeStamp *InputTime, AudioBufferList *OutputData, const AudioTimeStamp *OutputTime, void *appGlobals) { AudioBuffer abuf; char *aplbuf, *sndbuf; abuf = InputData->mBuffers[0]; aplbuf = (char *)(abuf.mData); sndbuf = bufs[out_buf]; memmove((void *)sndbuf, (void *)aplbuf, abuf.mDataByteSize); out_buf++; if (out_buf >= MAX_BUFS) out_buf = 0; return(noErr); } // BEGIN CR CHANGED // Use a default output unit for the output static AudioUnit gDefaultOutputUnit = NULL; // Audio Converter used, not to actually convert // data, but to avoid having to implement a ring buffer (see comment // in CreateAudioConverter) AudioConverterRef gOutputConverter; static unsigned int bufsize = 0, current_bufsize = 0; static UInt32 bufsize_in_frames = 0; OSStatus AudioConverterWriter( AudioConverterRef converter, UInt32* outDataSize, void** outData, void* inRefCon) { char *sndbuf; sndbuf = bufs[out_buf]; out_buf++; if (out_buf >= MAX_BUFS) out_buf = 0; *outData = sndbuf; *outDataSize = bufsize; return noErr; } OSStatus AudioUnitWriter( void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList *ioData) { /** * This would work if it were not for the potential sample rate conversion * */ AudioBuffer abuf; char *aplbuf, *sndbuf; abuf = ioData->mBuffers[0]; aplbuf = (char *)(abuf.mData); sndbuf = bufs[out_buf]; memmove((void *)aplbuf, (void *)sndbuf, abuf.mDataByteSize); out_buf++; if (out_buf >= MAX_BUFS) out_buf = 0; return noErr; /** * This should work once we figure out how often SND writes * data to its buffers and adjust this rate to any potential * sample rate conversion * UInt32 size = ioData->mBuffers[0].mDataByteSize; OSStatus err = AudioConverterFillBuffer( gOutputConverter, AudioConverterWriter, 0, &size, ioData->mBuffers[0].mData); return err; */ } int CreateDefaultAU() { OSStatus err = noErr; // Open the default output unit ComponentDescription desc; desc.componentType = kAudioUnitType_Output; desc.componentSubType = kAudioUnitSubType_DefaultOutput; desc.componentManufacturer = kAudioUnitManufacturer_Apple; desc.componentFlags = 0; desc.componentFlagsMask = 0; Component comp = FindNextComponent(NULL, &desc); if (comp == NULL) { fprintf(stderr, "open audio output (find output AU) err: %d (%4.4s) %s\n", (int)err, (char*)&err, osx_error(err)); return MUS_ERROR; } err = OpenAComponent(comp, &gDefaultOutputUnit); if (gDefaultOutputUnit == NULL) { fprintf(stderr, "open audio output (create output AU) err: %d (%4.4s) %s\n", (int)err, (char*)&err, osx_error(err)); return MUS_ERROR; } // Set up a callback function to generate output to the output unit AURenderCallbackStruct input; input.inputProc = AudioUnitWriter; input.inputProcRefCon = NULL; err = AudioUnitSetProperty (gDefaultOutputUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 0, &input, sizeof(input)); if (err) { fprintf(stderr, "open audio output (set AU callback) err: %d (%4.4s) %s\n", (int)err, (char*)&err, osx_error(err)); return MUS_ERROR; } return MUS_NO_ERROR; } int CreateAudioConverter(AudioStreamBasicDescription* device_desc) { // This admittedly looks pretty weird, creating a format converter // that converts to the same format, but I do this because I need // the bufs to be a ring buffer. Instead of implement my own ring buffer, // I'll just take advantage of the audio converter to get this behavior OSStatus err; if (gOutputConverter) { err = AudioConverterDispose(gOutputConverter); if (err) { fprintf(stderr,"open audio output (dispose audio converter) failed %i (0x%x / %4.4s) %s\n", (int)err, (int)err, (char*)&err, osx_error(err)); return(MUS_ERROR); } } err = AudioConverterNew(device_desc, device_desc, &gOutputConverter); if (err) { fprintf(stderr,"open audio output (create audio converter) failed %i (0x%x / %4.4s) %s\n", (int)err, (int)err, (char*)&err, osx_error(err)); return(MUS_ERROR); } } // END CR CHANGED static AudioDeviceID device = kAudioDeviceUnknown; static bool writing = false, open_for_input = false; int mus_audio_close(int line) { OSStatus err = noErr; UInt32 sizeof_running; UInt32 running; if (open_for_input) { in_buf = 0; err = AudioDeviceStop(device, (AudioDeviceIOProc)reader); if (err == noErr) err = AudioDeviceRemoveIOProc(device, (AudioDeviceIOProc)reader); } else // open for output { // BEGIN CR CHANGED if ((in_buf > 0) && (!writing)) { /* short enough sound that we never got started? */ err = AudioUnitInitialize(gDefaultOutputUnit); if (!err) err = AudioOutputUnitStart(gDefaultOutputUnit); if (err == noErr) writing = true; } if (writing) { /* send out waiting buffers */ /* sizeof_running = sizeof(UInt32); while (in_buf == out_buf) { err = AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyDeviceIsRunning, &sizeof_running, &running); } while (in_buf != out_buf) { err = AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyDeviceIsRunning, &sizeof_running, &running); } in_buf = 0; err = AudioDeviceStop(device, (AudioDeviceIOProc)writer); if (err == noErr) err = AudioDeviceRemoveIOProc(device, (AudioDeviceIOProc)writer); writing = false; */ err = AudioOutputUnitStop(gDefaultOutputUnit); if (!err) err = AudioUnitUninitialize(gDefaultOutputUnit); writing = false; // END CR CHANGED } } device = kAudioDeviceUnknown; if (err == noErr) return(MUS_NO_ERROR); return(MUS_ERROR); } typedef enum {CONVERT_NOT, CONVERT_COPY, CONVERT_SKIP, CONVERT_COPY_AND_SKIP, CONVERT_SKIP_N, CONVERT_COPY_AND_SKIP_N} audio_convert_t; static audio_convert_t conversion_choice = CONVERT_NOT; static float conversion_multiplier = 1.0; static int dac_out_chans, dac_out_srate; static int incoming_out_chans = 1, incoming_out_srate = 44100; static int fill_point = 0; // CR CHANGED -- Moved declaration of bufsize up a bit // because I need it in a function declared above int mus_audio_open_output(int dev, int srate, int chans, int format, int size) { // BEGIN CR CHANGED // We need to work with both the device and the AudioUnit, since // some properties can only be set directly on the device (like BufferSize) // and others, on the AudioUnit. OSStatus err = noErr; UInt32 paramSize; UInt32 sizeof_device, sizeof_format, sizeof_bufframes; AudioStreamBasicDescription device_desc; sizeof_device = sizeof(AudioDeviceID); sizeof_bufframes = sizeof(UInt32); // create the DefaultOutput AU (if necessary) if (NULL == gDefaultOutputUnit) { int result = CreateDefaultAU(); if (MUS_NO_ERROR != result) return result; } // get the device and, from the device, the buffer size (in frames) err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &sizeof_device, (void *)(&device)); if (!err) err = AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyBufferFrameSize, &sizeof_bufframes, &bufsize_in_frames); if (err) { fprintf(stderr,"open audio output err: %d %s\n", (int)err, osx_error(err)); return(MUS_ERROR); } // set-up the format we want to use device_desc.mSampleRate = srate; // the sample rate of the audio stream device_desc.mFormatID = kAudioFormatLinearPCM; // the specific encoding type of audio stream device_desc.mFormatFlags = // flags specific to each format kLinearPCMFormatFlagIsFloat // interleaved, big-endian floats | kLinearPCMFormatFlagIsBigEndian | kLinearPCMFormatFlagIsPacked; device_desc.mBytesPerPacket = sizeof(float) * chans; // packet is the same as frame in this case (LPCM) device_desc.mFramesPerPacket = 1; // see above device_desc.mBytesPerFrame = sizeof(float) * chans; // bytes per float times num channels device_desc.mChannelsPerFrame = chans; // num channels device_desc.mBitsPerChannel = sizeof(float) * 8; // bytes per float times num bits per byte // set the format err = AudioUnitSetProperty( gDefaultOutputUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &device_desc, sizeof(AudioStreamBasicDescription)); // get the nominal sample rate of the devce, so we can factor in any // sample rate conversions into the buffer size Float64 deviceNominalSampleRate = 0.0; paramSize = sizeof(deviceNominalSampleRate); err = AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyNominalSampleRate, ¶mSize, &deviceNominalSampleRate); if (err) { fprintf(stderr,"open audio output err (get sample rate): %d 0x%x %4.4s %s\n", err, err, (char*)&err, osx_error(err)); return(MUS_ERROR); } // set the buffer size (in bytes), with some correction for sample rate conversion bufsize = bufsize_in_frames * device_desc.mBytesPerFrame; if (err) { fprintf(stderr, "open audio output err setting stream format: %i (0x%x / %4.4s) %s\n", (int)err, (int)err, (char*)&err, osx_error(err)); return(MUS_ERROR); } /* now check for srate/chan mismatches and so on */ if (err != noErr) { fprintf(stderr,"open audio output (get device format) err: %d %s\n", (int)err, osx_error(err)); return(MUS_ERROR); } /* current DAC state: device_desc.mChannelsPerFrame, (int)(device_desc.mSampleRate) */ if ((device_desc.mChannelsPerFrame != chans) || ((int)(device_desc.mSampleRate) != srate)) { // this shouldn't happen fprintf(stderr,"open audio output (set device format) failed\n"); return(MUS_ERROR); } if (MUS_ERROR == CreateAudioConverter(&device_desc)) return(MUS_ERROR); /* now DAC claims it is ready for device_desc.mChannelsPerFrame, (int)(device_desc.mSampleRate) */ dac_out_chans = device_desc.mChannelsPerFrame; /* use better variable names */ dac_out_srate = (int)(device_desc.mSampleRate); open_for_input = false; // END CR CHANGED if ((bufs == NULL) || (bufsize > current_bufsize)) { int i; if (bufs) { for (i = 0; i < MAX_BUFS; i++) FREE(bufs[i]); FREE(bufs); } bufs = (char **)CALLOC(MAX_BUFS, sizeof(char *)); for (i = 0; i < MAX_BUFS; i++) bufs[i] = (char *)CALLOC(bufsize, sizeof(char)); current_bufsize = bufsize; } in_buf = 0; out_buf = 0; fill_point = 0; incoming_out_srate = srate; incoming_out_chans = chans; if (incoming_out_chans == dac_out_chans) { if (incoming_out_srate == dac_out_srate) { conversion_choice = CONVERT_NOT; conversion_multiplier = 1.0; } else { /* here we don't get very fancy -- assume dac/2=in */ conversion_choice = CONVERT_COPY; conversion_multiplier = 2.0; } } else { if (incoming_out_srate == dac_out_srate) { if ((dac_out_chans == 2) && (incoming_out_chans == 1)) /* the usual case */ { conversion_choice = CONVERT_SKIP; conversion_multiplier = 2.0; } else { conversion_choice = CONVERT_SKIP_N; conversion_multiplier = ((float)dac_out_chans / (float)incoming_out_chans); } } else { if ((dac_out_chans == 2) && (incoming_out_chans == 1)) /* the usual case */ { conversion_choice = CONVERT_COPY_AND_SKIP; conversion_multiplier = 4.0; } else { conversion_choice = CONVERT_COPY_AND_SKIP_N; conversion_multiplier = ((float)dac_out_chans / (float)incoming_out_chans) * 2; } } } return(MUS_NO_ERROR); } static void convert_incoming(char *to_buf, int fill_point, int lim, char *buf) { int i, j, k, jc, kc, ic; switch (conversion_choice) { case CONVERT_NOT: /* no conversion needed */ for (i = 0; i < lim; i++) to_buf[i + fill_point] = buf[i]; break; case CONVERT_COPY: /* copy sample to mimic lower srate */ for (i = 0, j = fill_point; i < lim; i += 8, j += 16) for (k = 0; k < 8; k++) { to_buf[j + k] = buf[i + k]; to_buf[j + k + 8] = buf[i + k]; } break; case CONVERT_SKIP: /* skip sample for empty chan */ for (i = 0, j = fill_point; i < lim; i += 4, j += 8) for (k = 0; k < 4; k++) { to_buf[j + k] = buf[i + k]; to_buf[j + k + 4] = 0; } break; case CONVERT_SKIP_N: /* copy incoming_out_chans then skip up to dac_out_chans */ jc = dac_out_chans * 4; ic = incoming_out_chans * 4; for (i = 0, j = fill_point; i < lim; i += ic, j += jc) { for (k = 0; k < ic; k++) to_buf[j + k] = buf[i + k]; for (k = ic; k < jc; k++) to_buf[j + k] = 0; } break; case CONVERT_COPY_AND_SKIP: for (i = 0, j = fill_point; i < lim; i += 4, j += 16) for (k = 0; k < 4; k++) { to_buf[j + k] = buf[i + k]; to_buf[j + k + 4] = 0; to_buf[j + k + 8] = buf[i + k]; to_buf[j + k + 12] = 0; } break; case CONVERT_COPY_AND_SKIP_N: /* copy for each active chan, skip rest */ jc = dac_out_chans * 8; ic = incoming_out_chans * 4; kc = dac_out_chans * 4; for (i = 0, j = fill_point; i < lim; i += ic, j += jc) { for (k = 0; k < ic; k++) { to_buf[j + k] = buf[i + k]; to_buf[j + k + kc] = buf[i + k]; } for (k = ic; k < kc; k++) { to_buf[j + k] = 0; to_buf[j + k + kc] = 0; } } break; } } int mus_audio_write(int line, char *buf, int bytes) { OSStatus err = noErr; int lim, bp, out_bytes; UInt32 sizeof_running; UInt32 running; char *to_buf; to_buf = bufs[in_buf]; out_bytes = (int)(bytes * conversion_multiplier); if ((fill_point + out_bytes) > bufsize) out_bytes = bufsize - fill_point; lim = (int)(out_bytes / conversion_multiplier); if (!writing) { convert_incoming(to_buf, fill_point, lim, buf); fill_point += out_bytes; if (fill_point >= bufsize) { in_buf++; fill_point = 0; if (in_buf == MAX_BUFS) { // BEGIN CR CHANGED in_buf = 0; err = AudioUnitInitialize(gDefaultOutputUnit); if (!err) err = AudioOutputUnitStart(gDefaultOutputUnit); if (err == noErr) { writing = true; return(MUS_NO_ERROR); } else return(MUS_ERROR); } // END CR CHANGED } return(MUS_NO_ERROR); } if ((fill_point == 0) && (in_buf == out_buf)) { bp = out_buf; sizeof_running = sizeof(UInt32); while (bp == out_buf) { /* i.e. just kill time without hanging */ err = AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyDeviceIsRunning, &sizeof_running, &running); /* usleep(10); */ } } to_buf = bufs[in_buf]; if (fill_point == 0) memset((void *)to_buf, 0, bufsize); convert_incoming(to_buf, fill_point, lim, buf); fill_point += out_bytes; if (fill_point >= bufsize) { in_buf++; fill_point = 0; if (in_buf >= MAX_BUFS) in_buf = 0; } return(MUS_NO_ERROR); } int mus_audio_open_input(int dev, int srate, int chans, int format, int size) { OSStatus err = noErr; UInt32 sizeof_device; UInt32 sizeof_bufsize; sizeof_device = sizeof(AudioDeviceID); sizeof_bufsize = sizeof(unsigned int); err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice, &sizeof_device, (void *)(&device)); bufsize = 4096; if (err == noErr) err = AudioDeviceGetProperty(device, 0, true, kAudioDevicePropertyBufferSize, &sizeof_bufsize, &bufsize); if (err != noErr) { fprintf(stderr,"open audio input err: %d %s\n", (int)err, osx_error(err)); return(MUS_ERROR); } open_for_input = true; /* assume for now that recorder (higher level) will enforce match */ if ((bufs == NULL) || (bufsize > current_bufsize)) { int i; if (bufs) { for (i = 0; i < MAX_BUFS; i++) FREE(bufs[i]); FREE(bufs); } bufs = (char **)CALLOC(MAX_BUFS, sizeof(char *)); for (i = 0; i < MAX_BUFS; i++) bufs[i] = (char *)CALLOC(bufsize, sizeof(char)); current_bufsize = bufsize; } in_buf = 0; out_buf = 0; fill_point = 0; incoming_out_srate = srate; incoming_out_chans = chans; err = AudioDeviceAddIOProc(device, (AudioDeviceIOProc)reader, NULL); if (err == noErr) err = AudioDeviceStart(device, (AudioDeviceIOProc)reader); if (err != noErr) { fprintf(stderr,"add open audio input err: %d %s\n", (int)err, osx_error(err)); return(MUS_ERROR); } return(MUS_NO_ERROR); } int mus_audio_read(int line, char *buf, int bytes) { OSStatus err = noErr; int bp; UInt32 sizeof_running; UInt32 running; char *to_buf; if (in_buf == out_buf) { bp = out_buf; sizeof_running = sizeof(UInt32); while (bp == out_buf) { err = AudioDeviceGetProperty(device, 0, true, kAudioDevicePropertyDeviceIsRunning, &sizeof_running, &running); if (err != noErr) fprintf(stderr,"wait err: %s ", osx_error(err)); } } to_buf = bufs[in_buf]; if (bytes <= bufsize) memmove((void *)buf, (void *)to_buf, bytes); else memmove((void *)buf, (void *)to_buf, bufsize); in_buf++; if (in_buf >= MAX_BUFS) in_buf = 0; return(MUS_ERROR); } static int max_chans(AudioDeviceID device, int input) { int maxc = 0, formats, k, config_chans; UInt32 size; OSStatus err; AudioStreamBasicDescription desc; AudioStreamBasicDescription *descs; size = sizeof(AudioStreamBasicDescription); err = AudioDeviceGetProperty(device, 0, input, kAudioDevicePropertyStreamFormat, &size, &desc); if (err == noErr) { maxc = (int)(desc.mChannelsPerFrame); size = 0; err = AudioDeviceGetPropertyInfo(device, 0, input, kAudioDevicePropertyStreamFormats, &size, NULL); formats = size / sizeof(AudioStreamBasicDescription); if (formats > 1) { descs = (AudioStreamBasicDescription *)CALLOC(formats, sizeof(AudioStreamBasicDescription)); size = formats * sizeof(AudioStreamBasicDescription); err = AudioDeviceGetProperty(device, 0, input, kAudioDevicePropertyStreamFormats, &size, descs); if (err == noErr) for (k = 0; k < formats; k++) if ((int)(descs[k].mChannelsPerFrame) > maxc) maxc = (int)(descs[k].mChannelsPerFrame); FREE(descs); } } else fprintf(stderr, "read chans hit: %s\n", osx_error(err)); config_chans = max_chans_via_stream_configuration(device, input); if (config_chans > maxc) return(config_chans); return(maxc); } int mus_audio_mixer_read(int dev1, int field, int chan, float *val) { AudioDeviceID dev = kAudioDeviceUnknown; OSStatus err = noErr; UInt32 size; Float32 amp; int i, curdev; bool in_case = false; switch (field) { case MUS_AUDIO_AMP: size = sizeof(AudioDeviceID); err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &size, &dev); size = sizeof(Float32); err = AudioDeviceGetProperty(dev, chan + 1, false, kAudioDevicePropertyVolumeScalar, &size, &); if (err == noErr) val[0] = (Float)amp; else val[0] = 0.0; break; case MUS_AUDIO_CHANNEL: curdev = MUS_AUDIO_DEVICE(dev1); size = sizeof(AudioDeviceID); in_case = ((curdev == MUS_AUDIO_MICROPHONE) || (curdev == MUS_AUDIO_LINE_IN)); if (in_case) err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice, &size, &dev); else err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &size, &dev); if (err != noErr) fprintf(stderr, "get default: %s\n", osx_error(err)); val[0] = max_chans(dev, in_case); break; case MUS_AUDIO_SRATE: val[0] = 44100; break; case MUS_AUDIO_FORMAT: /* never actually used except perhaps play.scm */ val[0] = 1.0; val[1] = MUS_BFLOAT; break; case MUS_AUDIO_PORT: i = 0; if (1 < chan) val[1] = MUS_AUDIO_MICROPHONE; if (2 < chan) val[2] = MUS_AUDIO_DAC_OUT; val[0] = 2; break; case MUS_AUDIO_SAMPLES_PER_CHANNEL: /* bufsize / 16: mulaw 22050 mono -> float 44100 stereo => 16:1 expansion */ { int bufsize = 4096; UInt32 sizeof_bufsize; sizeof_bufsize = sizeof(unsigned int); curdev = MUS_AUDIO_DEVICE(dev1); size = sizeof(AudioDeviceID); in_case = ((curdev == MUS_AUDIO_MICROPHONE) || (curdev == MUS_AUDIO_LINE_IN)); if (in_case) err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice, &size, &dev); else err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &size, &dev); if (err != noErr) fprintf(stderr, "get samps/chan: %s\n", osx_error(err)); else { err = AudioDeviceGetProperty(dev, 0, true, kAudioDevicePropertyBufferSize, &sizeof_bufsize, &bufsize); if (err == noErr) val[0] = (float)(bufsize / 16); } } break; default: return(MUS_ERROR); break; } return(MUS_NO_ERROR); } int mus_audio_mixer_write(int dev1, int field, int chan, float *val) { AudioDeviceID dev = kAudioDeviceUnknown; OSStatus err = noErr; Boolean writable; UInt32 size; Float32 amp; switch (field) { case MUS_AUDIO_AMP: size = sizeof(AudioDeviceID); err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &size, (void *)(&dev)); err = AudioDeviceGetPropertyInfo(dev, chan + 1, false, kAudioDevicePropertyVolumeScalar, NULL, &writable); /* "false" -> output */ amp = (Float32)(val[0]); if ((err == kAudioHardwareNoError) && (writable)) err = AudioDeviceSetProperty(dev, NULL, chan + 1, false, kAudioDevicePropertyVolumeScalar, sizeof(Float32), &); break; default: return(MUS_ERROR); break; } return(MUS_NO_ERROR); } int mus_audio_initialize(void) {return(MUS_NO_ERROR);} int mus_audio_systems(void) {return(1);} char *mus_audio_system_name(int system) {return("Mac OSX");} char *mus_audio_moniker(void) {return("Mac OSX audio");} #endif -- C. Ramakrishnan cramakri at zkm.de ZKM | Zentrum fuer Kunst und Medientechnologie Institut fuer Musik und Akustik From bil at ccrma.Stanford.EDU Fri Apr 8 04:27:02 2005 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Fri, 08 Apr 2005 04:27:02 -0700 Subject: [CM] snd error: "Wrong type to apply:" In-Reply-To: References: <20050407190002.16225.35226.Mailman@cm-mail.stanford.edu> Message-ID: <42566A86.2030605@ccrma> Thanks for the bug report and the fix! I wonder why I didn't hit that error in my test suite. I'll merge in the changes later today. From bil at ccrma.Stanford.EDU Fri Apr 8 04:37:20 2005 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Fri, 08 Apr 2005 04:37:20 -0700 Subject: [CM] snd on MacOS X In-Reply-To: <427e70b76a7911c3ef349cf7238f9097@zkm.de> References: <427e70b76a7911c3ef349cf7238f9097@zkm.de> Message-ID: <42566CF0.5070007@ccrma> Thanks very much for the code -- I'll look at it in detail later today. The "sleep" is around line 7946, I think, and line 8024, but it's been years (or feels like years) since I looked at this code. Eventually I'd like to include an option to use portaudio in this case. From anthonykozar at sbcglobal.net Sat Apr 9 10:49:32 2005 From: anthonykozar at sbcglobal.net (Anthony Kozar) Date: Sat, 09 Apr 2005 13:49:32 -0400 Subject: [CM] cm 2.6.0 with MCL 4.3.1 In-Reply-To: <011d1153b0202d6f73f2c2ec412603f4@uiuc.edu> Message-ID: Hello, Congratulations to Rick on the release of the much anticipated CM 2.6.0 !! ;) I decided to see if things still worked in MCL 4.3.1/MacOS 9.1 since it was no longer listed as a "tested platform." I am happy to report that cm.lisp appeared to load fine (lots of warnings, but nothing fatal). I guess that it no longer automatically saves an application image, so I made one myself. (BTW, the "Save App..." dialog lists "CM" under "Application Class" which is nice, and it suggests the application creator code of 'cm-2'. The last version of CM that I tried was 2.3.4, and I just thought that I would point out that it automatically saved itself with a creator of 'CM-2' **, a nice set of icons, and a BNDL resource. Is this functionality gone now?). After relaunching my CM image, I loaded test.cm and ran (test-cm). And I received the following message after a bunch of successful tests: Testing save-object. 1. Checking saved file exists ... OK > Error: Unbound variable: || > While executing: ccl::cheap-eval-in-environment > Type Command-/ to continue, Command-. to abort. > If continued: Retry getting the value of ||. Is this a problem or can it be ignored? Thanks. Anthony Kozar anthonykozar at sbcglobal.net http://akozar.spymac.net/ ** BTW, I checked with Apple recently and noticed the creator 'CM-2' has not been registered. 'cm-2' does not contain any uppercase letters and so is "reserved by Apple." (Not that it is likely to matter in the post-OS 9 world :) On 3/23/05 5:15 PM, Rick Taube etched in stone: > Common Music 2.6.0 is now available for download from Sourceforge: > > http://sourceforge.net/projects/commonmusic/ From taube at uiuc.edu Mon Apr 11 12:09:21 2005 From: taube at uiuc.edu (Rick Taube) Date: Mon, 11 Apr 2005 14:09:21 -0500 Subject: [CM] cm 2.6.0 with MCL 4.3.1 In-Reply-To: References: Message-ID: <62cff4253408aff68ac57cd172256938@uiuc.edu> >> Error: Unbound variable: || >> While executing: ccl::cheap-eval-in-environment >> Type Command-/ to continue, Command-. to abort. >> If continued: Retry getting the value of ||. > > Is this a problem or can it be ignored? Thanks. if you can eval (new seq :name 'foo) then you shoud be ok. i think only scheme will care about class variables but i wont attempt to fix anything in mcl/os9 anymore, its hopelessly out of date. > thought that I would point out that it automatically saved itself with > a > creator of 'CM-2' **, a nice set of icons, and a BNDL resource. Is > this > functionality gone now?). for a bundled app with pretty icons download the 2.6.0 dmg from sourceforge: http://prdownloads.sourceforge.net/commonmusic/cm_2.6.0-app-osx.dmg.gz? download From heisters at 0x09.com Mon Apr 11 17:25:20 2005 From: heisters at 0x09.com (Ian Smith-Heisters) Date: Mon, 11 Apr 2005 17:25:20 -0700 Subject: [CM] CM for live performance Message-ID: <425B1570.6010701@0x09.com> Howdy all, I've been using Pure Data to do live performance for a few years, but I'm getting frustrated with its patch paradigm, and I think I could produce better stuff in a text based language. So I've started to look at SuperCollider, JSyn, and CM. CM is the most attractive to me because I love Lisp and it's open source, whereas JSyn doesn't seem to be OSS. Does CM lend itself to live performance? Is it easy to build up GUIs for interaction/control? What do most people use it for? I've searched the web and haven't found too many examples of projects using CM; the impression I've developed is that it's used for research, but not too much for more everyday media. Is there any possibility of using CM along with another Lisp library to do real-time video manipulation? Anyway, thanks for any thoughts you can offer. Cheers, Ian Smith-Heisters -- http://www.0x09.com From andersvi at extern.uio.no Mon Apr 11 23:48:02 2005 From: andersvi at extern.uio.no (andersvi at extern.uio.no) Date: Tue, 12 Apr 2005 08:48:02 +0200 Subject: [CM] CM for live performance In-Reply-To: <425B1570.6010701@0x09.com> (Ian Smith-Heisters's message of "Mon, 11 Apr 2005 17:25:20 -0700") References: <425B1570.6010701@0x09.com> Message-ID: >>> "IS" == Ian Smith-Heisters writes: IS> IS> Howdy all, IS> I've been using Pure Data to do live performance for a few years, but IS> I'm getting frustrated with its patch paradigm, and I think I could IS> produce better stuff in a text based language. So I've started to look IS> at SuperCollider, JSyn, and CM. CM is the most attractive to me because IS> I love Lisp and it's open source, whereas JSyn doesn't seem to be OSS. My 2 cents. I think the midishare output class in CM schedules output in realtime. But CM has powerful tools for generating (and analyzing) patterns and control structure at various levels. A good use of CM in realtime situations is running pd or supercollider or some other realtime sound-engine together with CM. And calling various processes in CM at will to generate .qlist-files or similar for pd or files with lists of instrument-calls for supercollider. Heres a io-class for outputting to a .qlist-file (intended for PD's qlist-object) together with an example fm-object in case you want to try it. Just load it in after booting cm. -------------- next part -------------- A non-text attachment was scrubbed... Name: qlist-io.cl Type: application/octet-stream Size: 2570 bytes Desc: qlist-io-class for cm URL: -------------- next part -------------- If you're in for a lisp-based realtime DSP tool to replace PD or supercollider, take a look at Kjetil Matheussens new rt-engine.scm for snd, available in the snd-7 distribution at CCRMA. The interface is all scheme, like clm and cm, and it seems to run very efficiently. IS> Does CM lend itself to live performance? Is it easy to build up GUIs for IS> interaction/control? What do most people use it for? I've searched the IS> web and haven't found too many examples of projects using CM; the IS> impression I've developed is that it's used for research, but not too IS> much for more everyday media. Is there any possibility of using CM along IS> with another Lisp library to do real-time video manipulation? This should be straight forward if you know of any such tool. There used to be (is?) a vrml-output-class in cm. -anders From dlphillips at woh.rr.com Tue Apr 12 03:27:39 2005 From: dlphillips at woh.rr.com (Dave Phillips) Date: Tue, 12 Apr 2005 06:27:39 -0400 Subject: [CM] CM for live performance In-Reply-To: <425B1570.6010701@0x09.com> References: <425B1570.6010701@0x09.com> Message-ID: <425BA29B.7040605@woh.rr.com> Hi Ian: FWIW, I've been experimenting recently with MidiShare output and other realtime output possibilities with CM. I'm not sure I'd call it a performance tool, but it does perform very well in realtime (I'm working with CM 2.6.0 under CMUCL, Planet CCRMA RH9). My work in this direction has been almost entirely focused on MIDI output, but I think you could just as easily drive SC3 or Csound audio output from CM. Best, dp Ian Smith-Heisters wrote: >I've been using Pure Data to do live performance for a few years, but >I'm getting frustrated with its patch paradigm, and I think I could >produce better stuff in a text based language. So I've started to look >at SuperCollider, JSyn, and CM. CM is the most attractive to me because >I love Lisp and it's open source, whereas JSyn doesn't seem to be OSS. > >Does CM lend itself to live performance? Is it easy to build up GUIs for >interaction/control? What do most people use it for? I've searched the >web and haven't found too many examples of projects using CM; the >impression I've developed is that it's used for research, but not too >much for more everyday media. Is there any possibility of using CM along >with another Lisp library to do real-time video manipulation? > > From heisters at 0x09.com Tue Apr 12 09:19:48 2005 From: heisters at 0x09.com (Ian Smith-Heisters) Date: Tue, 12 Apr 2005 09:19:48 -0700 Subject: [CM] CM for live performance In-Reply-To: <425BA29B.7040605@woh.rr.com> References: <425B1570.6010701@0x09.com> <425BA29B.7040605@woh.rr.com> Message-ID: <425BF524.202@0x09.com> Hmm.. Midishare isn't quite my cup of tea because of an almost superstitious aversion I have to Midi. I find that it ties me too much to a concept of triggers and notes, though I'm sure it's possible to move away from that. It seems that currently the best application of Lisp for real-time performance would be as a frontend to another sound server (Pd or SuperCollider, etc.) via OSC or similar interface. The Pd qlist plugin offers one such interesting opportunity. rt-engine looks more like what I'm looking for. I'll definitely take a closer look at that. Thanks all for the advice. Best, Ian Dave Phillips wrote: > Hi Ian: > > FWIW, I've been experimenting recently with MidiShare output and other > realtime output possibilities with CM. I'm not sure I'd call it a > performance tool, but it does perform very well in realtime (I'm working > with CM 2.6.0 under CMUCL, Planet CCRMA RH9). My work in this direction > has been almost entirely focused on MIDI output, but I think you could > just as easily drive SC3 or Csound audio output from CM. > > Best, > > dp > > > Ian Smith-Heisters wrote: > >> I've been using Pure Data to do live performance for a few years, but >> I'm getting frustrated with its patch paradigm, and I think I could >> produce better stuff in a text based language. So I've started to look >> at SuperCollider, JSyn, and CM. CM is the most attractive to me because >> I love Lisp and it's open source, whereas JSyn doesn't seem to be OSS. >> >> Does CM lend itself to live performance? Is it easy to build up GUIs for >> interaction/control? What do most people use it for? I've searched the >> web and haven't found too many examples of projects using CM; the >> impression I've developed is that it's used for research, but not too >> much for more everyday media. Is there any possibility of using CM along >> with another Lisp library to do real-time video manipulation? >> >> > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist -- http://www.0x09.com From taube at uiuc.edu Tue Apr 12 07:05:58 2005 From: taube at uiuc.edu (Rick Taube) Date: Tue, 12 Apr 2005 09:05:58 -0500 Subject: [CM] CM for live performance In-Reply-To: <425BF524.202@0x09.com> References: <425B1570.6010701@0x09.com> <425BA29B.7040605@woh.rr.com> <425BF524.202@0x09.com> Message-ID: <472d2d6645d6fbc3dcfc11777d3f6bd2@uiuc.edu> > It seems that currently the best application of Lisp for real-time > performance would be as a frontend to another sound server (Pd or > SuperCollider, etc.) via OSC or similar interface. The Pd qlist plugin > offers one such interesting opportunity. I believe that Todd Ingalls has developed just this (a realtime connection to SC via OSC) but I really cant comment more on it since I havent seen it yet. Needless to say it would be a wonderful improvement. >>> Does CM lend itself to live performance? At this point it depends on the lisp/os environment. Realtime MIDI works pretty well in OpenMCL/OSX and includes callback support for receiving midi without polling. I originally ported CM to scheme with the idea that a scheme binding would allow one to work with CM from other (real time) environments. I dont know if anyone is attempting to do this or not. I am in the middle of porting CM to Gauche, Stklos and (possibly) Chicken. >>> Is it easy to build up GUIs for >>> interaction/control? Its certainly not as easy as putting boxes on a max patch window, but it is possible if you can deal with GTK. Both Gauche and Stklos have GTK support, so this will (hopefully) be possible soon in a scheme environment as well -rick From heisters at 0x09.com Tue Apr 12 14:30:34 2005 From: heisters at 0x09.com (Ian Smith-Heisters) Date: Tue, 12 Apr 2005 14:30:34 -0700 Subject: [CM] CM for live performance In-Reply-To: References: Message-ID: <425C3DFA.2030201@0x09.com> Actually, I just found this: http://www.alphalink.com.au/~rd/sw/scheme.html a scheme SC client. Alternatively, from what it sounds like, it wouldn't be hard to use non-CM lisp libraries to build up a GUI GTK OSC client to an SC server, but that seems redundant with the scheme SC client. I've heard of the PD scheme plugin, and had actually toyed with porting a MAX lisp plugin to PD, but I'm not sure that it's too useful for actually making music. The main use seems to be as a control; all the DSP needs to be done with native PD objects.. Thanks for the link to Nyquist, it also looks interesting. Cheers, ian Carl Edwards wrote: > > > FWIW: One other package that you could research is Dannenberg's Nyquist. It > has recently been incorporated as a scripting language in Audacity. > > http://audacity.sourceforge.net/help/nyquist > > > Here's it's own url: > > http://www-2.cs.cmu.edu/~music/music.software.html > > > As I understand it Nyquist is similar to SC in it's realtime focus. It's > free and also has an excellent manual. > > > > Carl > > > > >>It seems that currently the best application of Lisp for real-time >>performance would be as a frontend to another sound server (Pd or >>SuperCollider, etc.) via OSC or similar interface. The Pd qlist plugin >>offers one such interesting opportunity. > > -- http://www.0x09.com From k.s.matheussen at notam02.no Tue Apr 12 15:10:07 2005 From: k.s.matheussen at notam02.no (Kjetil Svalastog Matheussen) Date: Wed, 13 Apr 2005 00:10:07 +0200 (CEST) Subject: [CM] CM for live performance Message-ID: Ian Smith-Heisters: > Howdy all, > > I've been using Pure Data to do live performance for a few years, but > I'm getting frustrated with its patch paradigm, and I think I could > produce better stuff in a text based language. So I've started to look > at SuperCollider, JSyn, and CM. CM is the most attractive to me because > I love Lisp and it's open source, whereas JSyn doesn't seem to be OSS. > > Does CM lend itself to live performance? Is it easy to build up GUIs for If you use my k_guile external for PD, you can use common music to control PD. You'll get clicks, though, because of guile's garbage collector. But if you use two instances of pd and let one of them do data with guile and the other do sound, you avoid the clicks. http://www.notam02.no/arkiv/src/pd/ Supercollider with http://www.alphalink.com.au/~rd/sw/scheme.html might be a better alternative though. And my work with realtime clm in rt-compiler.scm/rt-engine.scm in snd is probably a bit too immature right now. -- From k.s.matheussen at notam02.no Tue Apr 12 15:17:51 2005 From: k.s.matheussen at notam02.no (Kjetil Svalastog Matheussen) Date: Wed, 13 Apr 2005 00:17:51 +0200 (CEST) Subject: [CM] CM for live performance Message-ID: Rick Taube: >At this point it depends on the lisp/os environment. Realtime MIDI >works pretty well in OpenMCL/OSX and includes callback support for >receiving midi without polling. I originally ported CM to scheme with >>the idea that a scheme binding would allow one to work with CM from >other (real time) environments. I dont know if anyone is attempting to >do this or not. I am in the middle of porting CM to Gauche, Stklos and >(possibly) Chicken. What about RScheme? (www.rscheme.org). I haven't investegated that much, but from what I have, I thought RScheme was the only (reasonable complete) scheme implementation with a realtime safe garbage collector? From taube at uiuc.edu Tue Apr 12 16:00:07 2005 From: taube at uiuc.edu (Rick Taube) Date: Tue, 12 Apr 2005 18:00:07 -0500 Subject: [CM] CM for live performance In-Reply-To: References: Message-ID: <90899700290c3b280ee7c25f3d426b98@uiuc.edu> > What about RScheme? (www.rscheme.org). I haven't investegated that > much, Hi, yes I did take a brief look at rscheme but its oop documentation was so sparse i couldnt tell if the object system was reasonable or not. i didn't consider its restriction of method dispatching on only one argument "reasonable" but in fairness it did seem to have some add-on that allowed multi dispatch. At any rate I decided to make gauche and stklos the first effort because they are really pretty close to guile and so i think i understand what to do. CM doesnt really need all that much from an object system -- and can be made even less needy -- but at some point i simply throw up my hands. > but from what I have, I thought RScheme was the only (reasonable > complete) > scheme implementation with a realtime safe garbage collector? cm's scheduler is consless, so if you preallocate things, stick to fixnums and/or use resources you can keep user garbage down. From webmusicae at hotmail.com Sun Apr 17 16:08:04 2005 From: webmusicae at hotmail.com (web musicae) Date: Sun, 17 Apr 2005 23:08:04 +0000 Subject: [CM] cm-2.6.0/ windowsXP Message-ID: hi, I have installed the cm-2.6.0 with clisp2.33 for windows. I have two questions: 1) Many functions work fine, but I have problems with MIDI and sometime with cmn output. When I write: [1]> (events (new midi :keynum 60) "hi.mid") *** - Condition of type UNBOUND-SLOT. The following restarts are available: STORE-VALUE :R1 You may input a new value for (SLOT-VALUE #i(midi keynum 60 duration 0.5 amplitude 64 channel 0) TIME). USE-VALUE :R2 You may input a value to be used instead of (SLOT-VALUE #i(midi keynum 60 duration 0.5 amplitude 64 channel 0) TIME). I have a answer like this, with cmn class. Please, what is my error?. 2) need I install cmn package? Anyone can't expain how to do it? (creating image for automatic load...) Thank's very much (from spain) From taube at uiuc.edu Sun Apr 17 18:04:31 2005 From: taube at uiuc.edu (Rick Taube) Date: Sun, 17 Apr 2005 20:04:31 -0500 Subject: [CM] cm-2.6.0/ windowsXP In-Reply-To: References: Message-ID: <299ff8aa34d2ca5ec7d3bf1e146b9e48@uiuc.edu> > hi, I have installed the cm-2.6.0 with clisp2.33 for windows. I have > two questions: > > 1) Many functions work fine, but I have problems with MIDI and > sometime with cmn output. When I write: > [1]> (events (new midi :keynum 60) "hi.mid") > *** - Condition of type UNBOUND-SLOT. yes the system is complaining that you have not set a :time value in the event. try: (events (new :midi :time 0 ) "hi.mid") It seemed silly to me to default time to zero if you don't specify it. My feeling was that if a composer doesn't know what time their sounds start at then they have no business making noise! > You may input a new value for (SLOT-VALUE > #i(midi keynum 60 duration 0.5 amplitude 64 channel 0) TIME). > I have a answer like this, with cmn class. Please, what is my error?. looks like the same issue to me. just remember that every object needs a time value if its going to be placed in a score and if you are the composer the you have come up with it somehow. its a dirty job but someone has to do it. pick them at random it you want to!: (events (loop for x in (ransegs 15 :type :high-pass :max 12) collect (new midi :time x :keynum (between 60 90))) "hi.mid") > 2) need I install cmn package? Anyone can't expain how to do it? > (creating image for automatic load...) yes. you should install CMN and then load it into CM once you start up. you can put the loading statement in an init file if you dont want to to type it. > > Thank's very much (from spain) good luck! From carl.boingie at verizon.net Mon Apr 18 10:22:42 2005 From: carl.boingie at verizon.net (Carl Edwards) Date: Mon, 18 Apr 2005 13:22:42 -0400 Subject: [CM] cm-2.6.0/ windowsXP In-Reply-To: <299ff8aa34d2ca5ec7d3bf1e146b9e48@uiuc.edu> Message-ID: > My feeling was that if a composer doesn't know what time their sounds > start at then they have no business making noise! LOL,... That's what they told John Cage! Just kidding, Carl Edwards From webmusicae at hotmail.com Mon Apr 18 11:17:00 2005 From: webmusicae at hotmail.com (web musicae) Date: Mon, 18 Apr 2005 18:17:00 +0000 Subject: [CM] cm-2.6.0/ windowsXP In-Reply-To: <299ff8aa34d2ca5ec7d3bf1e146b9e48@uiuc.edu> Message-ID: Hello Rick, Thank's!!. All is ok! (cmn installation and load, have many warnings!) Other question, the macro io, run on windows?, need midishare?. [1]> (io "thanks.mid" :tempo 120) ** - Continuable Error EVAL: undefined function IO If you continue (by typing 'continue'): Retry The following restarts are also available: STORE-VALUE :R1 You may input a new value for (FDEFINITION 'IO). USE-VALUE :R2 You may input a value to be used instead of (FDEFINITION 'IO). Thanks again Daigu >From: Rick Taube <taube at uiuc.edu> >To: "web musicae" <webmusicae at hotmail.com> >CC: cmdist at ccrma.Stanford.EDU >Subject: Re: [CM] cm-2.6.0/ windowsXP >Date: Sun, 17 Apr 2005 20:04:31 -0500 > > >>hi, I have installed the cm-2.6.0 with clisp2.33 for windows. I >>have two questions: >> >>1) Many functions work fine, but I have problems with MIDI and >>sometime with cmn output. When I write: >>[1]> (events (new midi :keynum 60) "hi.mid") >>*** - Condition of type UNBOUND-SLOT. > >yes the system is complaining that you have not set a :time value in >the event. try: > >(events (new :midi :time 0 ) "hi.mid") > >It seemed silly to me to default time to zero if you don't specify >it. My feeling was that if a composer doesn't know what time their >sounds start at then they have no business making noise! > >>You may input a new value for (SLOT-VALUE >>#i(midi keynum 60 duration 0.5 amplitude 64 channel 0) TIME). >>I have a answer like this, with cmn class. Please, what is my >>error?. > >looks like the same issue to me. just remember that every object >needs a time value if its going to be placed in a score and if you >are the composer the you have come up with it somehow. its a dirty >job but someone has to do it. pick them at random it you want to!: > >(events (loop for x in (ransegs 15 :type :high-pass :max 12) > collect (new midi :time x :keynum (between 60 >90))) > "hi.mid") > > >>2) need I install cmn package? Anyone can't expain how to do it? >>(creating image for automatic load...) > >yes. you should install CMN and then load it into CM once you start >up. you can put the loading statement in an init file if you dont >want to to type it. >> >>Thank's very much (from spain) > >good luck! > >_______________________________________________ >Cmdist mailing list >Cmdist at ccrma.stanford.edu >http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist From taube at uiuc.edu Mon Apr 18 14:46:08 2005 From: taube at uiuc.edu (Rick Taube) Date: Mon, 18 Apr 2005 16:46:08 -0500 Subject: [CM] cm-2.6.0/ windowsXP In-Reply-To: References: Message-ID: Odd, i thought that macro was still around but it seems not to be. You can use the underlying functon init-io instead: (init-io "test.mid" :tempo 120) perhaps thats why i removed the macro, it offers nothing over the function. Here is its definition: (defmacro io (str &rest inits) `(init-io ,str , at inits)) --rick From finnendahl at folkwang-hochschule.de Mon Apr 25 00:46:27 2005 From: finnendahl at folkwang-hochschule.de (Orm Finnendahl) Date: Mon, 25 Apr 2005 09:46:27 +0200 Subject: [CM] snd-7 gtk compile error Message-ID: <20050425074627.GA1994@finnendahl.de> Hi, trying to compile the latest tarball of snd with gtk gives this error: <...> gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I. -g -O2 snd-gutils.c snd-gutils.c: In function `rotate_text': snd-gutils.c:770: `PangoMatrix' undeclared (first use in this function) snd-gutils.c:770: (Each undeclared identifier is reported only once snd-gutils.c:770: for each function it appears in.) snd-gutils.c:770: parse error before "matrix" snd-gutils.c:773: `matrix' undeclared (first use in this function) make: *** [snd-gutils.o] Fehler 1 snd with motif compiles fine. -- Orm From bil at ccrma.Stanford.EDU Mon Apr 25 04:18:00 2005 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Mon, 25 Apr 2005 04:18:00 -0700 Subject: [CM] snd-7 gtk compile error In-Reply-To: <20050425074627.GA1994@finnendahl.de> References: <20050425074627.GA1994@finnendahl.de> Message-ID: <426CD1E8.7020100@ccrma> > snd-gutils.c:770: `PangoMatrix' undeclared (first use in this function) PangoMatrix must have been added between gtk 2.0 and 2.4 -- I'll add a check for it in the configure script. Thanks for the bug report! From bil at ccrma.Stanford.EDU Tue Apr 26 04:07:49 2005 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Tue, 26 Apr 2005 04:07:49 -0700 Subject: [CM] snd 7.12 Message-ID: <426E2105.1070702@ccrma> Snd 7.12: marks.rb, draw.rb, poly.rb, musglyphs.rb, and many other improvements thanks to Mike Scholz. rt-examples.scm and much else thanks to Kjetil Matheussen. mixer.scm with various matrix/vector functions (determinant, inverse, solve simultaneous linear equations, etc) as applied to mixers/frames. mixer-scale is now embedded in mixer* (old name is in snd7.scm), and frame*, frame+, mixer*, and mixer+ take either generator or float args. changed interpretation of frame->frame arguments. To get the old style, you need to reverse the first two args -- the new style reflects the actual matrix multiplication order, which I think makes more sense. poly.scm with various polynomial-related functions. added before-save-state-hook and y-axis-label. moved load-font from C to snd-motif.scm and snd-gtk.scm. removed xen->sample generator. changed mus-error-to-string to mus-error-type->string. moved mus-data-format->string and mus-header-type->string from ws.scm to C. changed moog.scm and prc95.scm to use def-clm-struct, rather than a list. zip.scm (zipper) changed (takes env args now, not thunks, uses def-clm-struct, etc). added invert-filter and volterra-filter in dsp.scm (also src-duration, for convenience) CLM: removed bessel.lisp -- it was very much out of date, and much of it is now available directly from libm (see note about bes-j0 etc in 7.11) added size arg (buffer size) to make-readin, make-file->sample, make-file->frame fullmix.ins defaults changed. checked: gtk 2.6.5|6|7 with much help from: Mike Scholz, Kjetil Matheussen, Rick Taube, Michael Klingbeil, Anders Vinjar, Fernando Lopez-Lezcano, Bill Sack, Chandrasekhar Ramakrishnan, Oded Ben-Tal, Russell Aspinwall, Orm Finnendahl From mis at artengine.ca Tue Apr 26 07:10:18 2005 From: mis at artengine.ca (Michal Seta) Date: 26 Apr 2005 10:10:18 -0400 Subject: [CM] snd 7.12 In-Reply-To: <426E2105.1070702@ccrma> References: <426E2105.1070702@ccrma> Message-ID: <87acnl1ved.fsf@localhost.localdomain> Bill Schottstaedt writes: > Snd 7.12: I'm getting this when tryin to run snd with Kjetil's conffile: /tmp/fileBaJIVM.c unbound-variable: (#f Unbound variable: ~S (m???N5???^4???_9????y) #f)Unbound variable: m???N5???^4???_9????y (while loading "/home/mis/.snd") ; (load ~/.snd) (snd:2983): Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed Any ideas? mis ~ $ snd --version This is Snd version 7.12 of 26-Apr-05: Xen: 1.32, Guile: 1.6.7 ALSA 1.0.8 Sndlib 19.12 (20-Apr-05, int24 samples) CLM 3.17 (18-Apr-05) fftw-3.0.1-sse2 Gtk+ 2.6.4, Glib 2.6.3, Pango 1.8.1 LADSPA 1.1, Jack: 0.99.0 with large file support with gettext: en_CA Compiled Apr 26 2005 10:03:26 C: 3.3.5 (Debian 1:3.3.5-12) Libc: 2.3.2.stable configured via: ./configure --with-alsa --with-jack --with-static-xg --with-guile --with-gl --with-ladspa --with-gtk --enable-snd-debug From wsack at acsu.buffalo.edu Tue Apr 26 08:00:58 2005 From: wsack at acsu.buffalo.edu (Bill Sack) Date: Tue, 26 Apr 2005 11:00:58 -0400 Subject: [CM] plotter segfaults saved cm image Message-ID: <426E57AA.2010806@acsu.buffalo.edu> hi all, i'm just getting around to trying cm-2.6 and the new gtk stuff. when i evaluate (plotter) inside cm before saving its image, everything goes well. however after starting cm from a saved image, i get the following segfault: * (plotter) Error in function UNIX::SIGSEGV-HANDLER: Segmentation Violation at #x456441D7. [Condition of type SIMPLE-ERROR] Restarts: 0: [ABORT] Return to Top-Level. Debug (type H for help) (UNIX::SIGSEGV-HANDLER # # #.(SYSTEM:INT-SAP #x3FFFECA8)) (i'm using cmucl-19a on linux here and the cm-2.6.0 tarball dated 03/24/2005) i just read in the cm installation directions that starting from a saved image is no longer the preferred way to go. i guess i can live with that, but are cm images and plotter really incompatible? thanks, b -- _________ Bill Sack wsack(a)acsu.buffalo.edu ---------------------- From taube at uiuc.edu Tue Apr 26 11:05:56 2005 From: taube at uiuc.edu (Rick Taube) Date: Tue, 26 Apr 2005 13:05:56 -0500 Subject: [CM] plotter segfaults saved cm image In-Reply-To: <426E57AA.2010806@acsu.buffalo.edu> References: <426E57AA.2010806@acsu.buffalo.edu> Message-ID: <5a51411e0e5214f048314b6355d4dd57@uiuc.edu> Hi bill i doubt they are incompatible -- My guess is that the shared library has to be (re)loaded , or pointers need to be revalidated or something. perhaps the cmucl docs say something about shared libries in saved images, ill take a look. > i just read in the cm installation directions that starting from a > saved image is no longer the preferred way to go. i guess i can live > with that, but are cm images and plotter really incompatible? From mis at artengine.ca Tue Apr 26 20:13:00 2005 From: mis at artengine.ca (Michal Seta) Date: 26 Apr 2005 23:13:00 -0400 Subject: [CM] snd 7.12 In-Reply-To: <87acnl1ved.fsf@localhost.localdomain> References: <426E2105.1070702@ccrma> <87acnl1ved.fsf@localhost.localdomain> Message-ID: <87pswgvrnn.fsf@localhost.localdomain> Ok, this is take 2. I have no idea why but my previous message seemed to have been converted into some gibberish. I have a problem with snd and Kjetil's conffile: /tmp/filevYYbTH.c unbound-variable: (#f Unbound variable: ~S (m?N5?^4?_9? (while loading "/home/mis/.snd") ; (load ~/.snd) (snd:3771): Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed which makes an Error box appear with nothing in it except for the [time]. Any ideas what is going on? snd --version This is Snd version 7.12 of 26-Apr-05: Xen: 1.32, Guile: 1.6.7 ALSA 1.0.8 Sndlib 19.12 (20-Apr-05, int24 samples) CLM 3.17 (18-Apr-05) fftw-3.0.1-sse2 Gtk+ 2.6.4, Glib 2.6.3, Pango 1.8.1 LADSPA 1.1, Jack: 0.99.0 with large file support with gettext: en_CA Compiled Apr 26 2005 10:03:26 C: 3.3.5 (Debian 1:3.3.5-12) Libc: 2.3.2.stable configured via: ./configure --with-alsa --with-jack --with-static-xg --with-guile --with-gl --with-ladspa --with-gtk --enable-snd-debug From k.s.matheussen at notam02.no Wed Apr 27 05:48:04 2005 From: k.s.matheussen at notam02.no (Kjetil Svalastog Matheussen ) Date: Wed, 27 Apr 2005 14:48:04 +0200 (CEST) Subject: [CM] snd 7.12 Message-ID: <23899.212.169.96.218.1114606084.squirrel@webmail.uio.no> Michal Seta: > Sorry, I tried to reply to your message yesterday, but it seems like my message didn't come thru. I have some small trouble with my mail-programs/internet connection, and that is also the reasons for the error-message you see; corrupted attachtment when sending code to Bill. Here is a (hopefully) working version of eval-c.scm: http://www.notam02.no/~kjetism/eval-c.scm If you replace the version of eval-c.scm in 7.12 with that one, it should work. Sorry for the trouble. From mis at artengine.ca Wed Apr 27 06:13:17 2005 From: mis at artengine.ca (Michal Seta) Date: 27 Apr 2005 09:13:17 -0400 Subject: [CM] snd 7.12 In-Reply-To: <23899.212.169.96.218.1114606084.squirrel@webmail.uio.no> References: <23899.212.169.96.218.1114606084.squirrel@webmail.uio.no> Message-ID: <87wtqo8is2.fsf@localhost.localdomain> "Kjetil Svalastog Matheussen " writes: > Here is a (hopefully) working version of eval-c.scm: This worked. thanks! ./MiS From bil at ccrma.Stanford.EDU Wed Apr 27 06:37:50 2005 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Wed, 27 Apr 2005 06:37:50 -0700 Subject: [CM] snd 7.12 In-Reply-To: <23899.212.169.96.218.1114606084.squirrel@webmail.uio.no> References: <23899.212.169.96.218.1114606084.squirrel@webmail.uio.no> Message-ID: <426F95AE.7030502@ccrma> I picked up the corrected eval-c.scm and updated my copies of Snd. I'll remake the 7.12 tarballs and so forth later today. From taube at uiuc.edu Thu Apr 28 15:56:17 2005 From: taube at uiuc.edu (Rick Taube) Date: Thu, 28 Apr 2005 17:56:17 -0500 Subject: [CM] subobject-->:time In-Reply-To: References: Message-ID: > Hello. How can I access to :time value of subobjects in a sequence. I > need obtain a list llike > ((time note duration) ...) ;from a midi-file (loop for x in (subobjects #&myseq) collect (list (sv x time) (sv x keynum) (sv x duration))) > And second question. I'd want to realize a converter from midi time to > score time, then need implement silence events (?) -then I need > resolve de first question. Example from (after import-events): > (midi :time 0 :keynum 60 :duration 1 ...) > (midi :time 3 :keynum 67 :duration 1...) > ... > to > (c4 q) > (rest h) > (g4 q) > ... (defun seq-to-notes (seq) (let ((endtime 0)) (loop for x in (subobjects seq) for begtime = (sv x time) for duration = (sv x duration) if (> begtime endtime) collect (list 'rest (- begtime endtime)) collect (list (note (sv x keynum)) duration) do (setq endtime (+ begtime duration))))) ;; test (new seq :name 'foo :subobjects (loop repeat 20 for beg = 0 then (+ beg (pick 1 2 3 4)) collect (new midi :time beg :duration 1 :keynum (random 100)))) (seq-to-notes #&foo) ((F6 1) (REST 3) (EF0 1) (REST 2) (FS0 1) (REST 3) (BF4 1) (REST 2) (A2 1) (REST 3) (FS1 1) (G5 1) (REST 1) (F-1 1) (B4 1) (REST 3) (D4 1) (D3 1) (BF3 1) (EF3 1) (REST 3) (EF4 1) (REST 2) (A4 1) (REST 3) (C0 1) (BF3 1) (REST 2) (D0 1) (REST 1) (D-1 1) (REST 3) (F2 1)) ? --rick From webmusicae at hotmail.com Fri Apr 29 03:01:44 2005 From: webmusicae at hotmail.com (web musicae) Date: Fri, 29 Apr 2005 10:01:44 +0000 Subject: [CM] subobject-->:time In-Reply-To: Message-ID: Helllo Rick, I'm surprised, was really easy with sv function. Tanks!. But, why 'sv' is not in Common Music Dictionary?. Maybe is a old feautre of cm < 2.6?. Do you advice me any complet documentation?. >From: Rick Taube <taube at uiuc.edu> >To: "web musicae" <webmusicae at hotmail.com> >CC: cmdist at ccrma.Stanford.EDU >Subject: Re: [CM] subobject-->:time >Date: Thu, 28 Apr 2005 17:56:17 -0500 > >>Hello. How can I access to :time value of subobjects in a sequence. >>I need obtain a list llike >>((time note duration) ...) ;from a midi-file > >(loop for x in (subobjects #&myseq) > collect (list (sv x time) (sv x keynum) (sv x duration))) > >>And second question. I'd want to realize a converter from midi time >>to score time, then need implement silence events (?) -then I need >>resolve de first question. Example from (after import-events): >>(midi :time 0 :keynum 60 :duration 1 ...) >>(midi :time 3 :keynum 67 :duration 1...) >>... >>to >>(c4 q) >>(rest h) >>(g4 q) >>... > >(defun seq-to-notes (seq) > (let ((endtime 0)) > (loop for x in (subobjects seq) > for begtime = (sv x time) > for duration = (sv x duration) > if (> begtime endtime) collect (list 'rest (- begtime >endtime)) > collect (list (note (sv x keynum)) duration) > do (setq endtime (+ begtime duration))))) > > >;; test >(new seq :name 'foo > :subobjects > (loop repeat 20 > for beg = 0 then (+ beg (pick 1 2 3 4)) > collect (new midi :time beg :duration 1 > :keynum (random 100)))) > >(seq-to-notes #&foo) > >((F6 1) (REST 3) (EF0 1) (REST 2) (FS0 1) (REST 3) (BF4 1) (REST 2) >(A2 1) > (REST 3) (FS1 1) (G5 1) (REST 1) (F-1 1) (B4 1) (REST 3) (D4 1) >(D3 1) (BF3 1) > (EF3 1) (REST 3) (EF4 1) (REST 2) (A4 1) (REST 3) (C0 1) (BF3 1) >(REST 2) > (D0 1) (REST 1) (D-1 1) (REST 3) (F2 1)) >? > > > >--rick > >_______________________________________________ >Cmdist mailing list >Cmdist at ccrma.stanford.edu >http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist From taube at uiuc.edu Fri Apr 29 06:25:00 2005 From: taube at uiuc.edu (Rick Taube) Date: Fri, 29 Apr 2005 08:25:00 -0500 Subject: [CM] subobject-->:time In-Reply-To: References: Message-ID: <3a6260c6d8fa581901952926964a42b4@uiuc.edu> > Do you advice me any complet documentation?. its just sugar-coating for slot-value, or slot-ref if you are using scheme: (sv foo time) => (slot-value foo 'time) => (slot-ref foo 'time) (sv foo time 1 duration 2) => (progn (setf (slot-value foo 'time) 1) (setf (slot-value foo 'duration) 2)) => (begin (slot-set! foo 'time 1) (slot-set! foo 'duration 2)) --rick From dlphillips at woh.rr.com Sat Apr 30 05:30:22 2005 From: dlphillips at woh.rr.com (Dave Phillips) Date: Sat, 30 Apr 2005 08:30:22 -0400 Subject: [CM] cmio problem Message-ID: <42737A5E.9030200@woh.rr.com> Greetings: Today's CVS builds all right, but I get this error whne I try to run cmio: CMU Common Lisp Snapshot 2004-11, running on cpe-65-189-231-99.woh.res.rr.com With core: /usr/lib/cmucl/lisp.core Dumped on: Sat, 2004-10-30 00:45:24-04:00 on lorien See for support information. Loaded subsystems: Python 1.1, target Intel x86 CLOS based on Gerd's PCL 2004/04/14 03:32:47 * (cmio) Error in KERNEL::UNBOUND-SYMBOL-ERROR-HANDLER: the variable *LINUX-MIDI-FILE-PLAYER* is unbound. [Condition of type UNBOUND-VARIABLE] Restarts: 0: [ABORT] Return to Top-Level. Debug (type H for help) (DEFAULT-FILE-HANDLER :MIDI) Source: ; File: /home/dlphilp/cm/src/gui/eventio.lisp (CASE TYP (:AUDIO (IF # "(dac)" "")) (:MIDI *LINUX-MIDI-FILE-PLAYER*) (:SCO "csound -d -m 0") ...) 0] 0 * Suggested fixes welcome... :) Best. dp From giordai at hotmail.com Sat Apr 30 06:37:07 2005 From: giordai at hotmail.com (giordai o laoire) Date: Sat, 30 Apr 2005 13:37:07 +0000 Subject: [CM] downloading for OSX Message-ID: dear folks I want to run CM to a G4 Powerbook laptop to write both midi and CSound .sco files and I intend to run Max/Msp on this machine as well. I'm considering the M-Audio D/A convertor as hardware. Any opinions out there? Also What's the simpliest downloading route for my purposes, there seems quite a choice. Been using an older version for OS9 for 4 yearso I'm outa touch, somewhat P.S. ordered NFTM from Amazon as I really like CM, as I know it yours Giordai _________________________________________________________________ Start dating right now with FREE Match.com membership! http://match.msn.ie From taube at uiuc.edu Sat Apr 30 06:58:17 2005 From: taube at uiuc.edu (Rick Taube) Date: Sat, 30 Apr 2005 08:58:17 -0500 Subject: [CM] cmio problem In-Reply-To: <42737A5E.9030200@woh.rr.com> References: <42737A5E.9030200@woh.rr.com> Message-ID: <32cc5009eb083eabe38e92aee5765962@uiuc.edu> sorry, lots is going on so cvs is a little unstable right now. i did run the test suite before committing but havent had time to test windowing -- ill track it down right now but it may take several hours to migrate to sf's anonymous server. sorry! On Apr 30, 2005, at 7:30 AM, Dave Phillips wrote: > Greetings: > > Today's CVS builds all right, but I get this error whne I try to run > cmio: > > CMU Common Lisp Snapshot 2004-11, running on > cpe-65-189-231-99.woh.res.rr.com > With core: /usr/lib/cmucl/lisp.core > Dumped on: Sat, 2004-10-30 00:45:24-04:00 on lorien > See for support information. > Loaded subsystems: > Python 1.1, target Intel x86 > CLOS based on Gerd's PCL 2004/04/14 03:32:47 > * (cmio) > > Error in KERNEL::UNBOUND-SYMBOL-ERROR-HANDLER: the variable > *LINUX-MIDI-FILE-PLAYER* is unbound. > [Condition of type UNBOUND-VARIABLE] > > Restarts: > 0: [ABORT] Return to Top-Level. > > Debug (type H for help) > > (DEFAULT-FILE-HANDLER :MIDI) > Source: > ; File: /home/dlphilp/cm/src/gui/eventio.lisp > (CASE TYP > (:AUDIO (IF # "(dac)" "")) > (:MIDI *LINUX-MIDI-FILE-PLAYER*) > (:SCO "csound -d -m 0") > ...) > 0] 0 > > * > > > Suggested fixes welcome... :) > > Best. > > dp > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist From dlphillips at woh.rr.com Sat Apr 30 06:50:28 2005 From: dlphillips at woh.rr.com (Dave Phillips) Date: Sat, 30 Apr 2005 09:50:28 -0400 Subject: [CM] cmio problem In-Reply-To: <32cc5009eb083eabe38e92aee5765962@uiuc.edu> References: <42737A5E.9030200@woh.rr.com> <32cc5009eb083eabe38e92aee5765962@uiuc.edu> Message-ID: <42738D24.2040302@woh.rr.com> Rick Taube wrote: > sorry, lots is going on so cvs is a little unstable right now. i did > run the test suite before committing but havent had time to test > windowing -- ill track it down right now but it may take several hours > to migrate to sf's anonymous server. sorry! FWIW, this also did not work: (cmio :files '(:midi "timidity -EFreverb=0 -EFchorus=0 -A100")) It results in the same error (unbound variable). If you come up with a fix, please send it directly to me, I'll be happy to test it here. :) Best, dp From dlphillips at woh.rr.com Sat Apr 30 07:01:45 2005 From: dlphillips at woh.rr.com (Dave Phillips) Date: Sat, 30 Apr 2005 10:01:45 -0400 Subject: [CM] cmio problem In-Reply-To: <42738D24.2040302@woh.rr.com> References: <42737A5E.9030200@woh.rr.com> <32cc5009eb083eabe38e92aee5765962@uiuc.edu> <42738D24.2040302@woh.rr.com> Message-ID: <42738FC9.20203@woh.rr.com> Hi Rick: Just FYI: Hard-wiring the player into eventio.lisp did the trick, though I imagine you'll want something more elegant. ;) Best, dp From taube at uiuc.edu Sat Apr 30 08:14:28 2005 From: taube at uiuc.edu (Rick Taube) Date: Sat, 30 Apr 2005 10:14:28 -0500 Subject: [CM] cmio problem In-Reply-To: <42738FC9.20203@woh.rr.com> References: <42737A5E.9030200@woh.rr.com> <32cc5009eb083eabe38e92aee5765962@uiuc.edu> <42738D24.2040302@woh.rr.com> <42738FC9.20203@woh.rr.com> Message-ID: <7f25ad1d2237245bc7dc6a2f178b3262@uiuc.edu> Yes, Im in the middle redoing the way cm handles playback so that it can handle all file types consistently. so expect problems until later today when i get a chance to finish the work ( I found some more bugs..) will email the list when its "safe" to cvs On Apr 30, 2005, at 9:01 AM, Dave Phillips wrote: > Hi Rick: > > Just FYI: Hard-wiring the player into eventio.lisp did the trick, > though I imagine you'll want something more elegant. ;) > > Best, > > dp > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist From dlphillips at woh.rr.com Sat Apr 30 08:08:32 2005 From: dlphillips at woh.rr.com (Dave Phillips) Date: Sat, 30 Apr 2005 11:08:32 -0400 Subject: [CM] cmio problem In-Reply-To: <7f25ad1d2237245bc7dc6a2f178b3262@uiuc.edu> References: <42737A5E.9030200@woh.rr.com> <32cc5009eb083eabe38e92aee5765962@uiuc.edu> <42738D24.2040302@woh.rr.com> <42738FC9.20203@woh.rr.com> <7f25ad1d2237245bc7dc6a2f178b3262@uiuc.edu> Message-ID: <42739F70.2070502@woh.rr.com> Hi Rick: Cool, thanks. I'll try to hold out until then... :) Best, dp Rick Taube wrote: > Yes, Im in the middle redoing the way cm handles playback so that it > can handle all file types consistently. so expect problems until later > today when i get a chance to finish the work ( I found some more > bugs..) will email the list when its "safe" to cvs > > On Apr 30, 2005, at 9:01 AM, Dave Phillips wrote: > >> Hi Rick: >> >> Just FYI: Hard-wiring the player into eventio.lisp did the trick, >> though I imagine you'll want something more elegant. ;) >> From taube at uiuc.edu Sat Apr 30 11:26:11 2005 From: taube at uiuc.edu (Rick Taube) Date: Sat, 30 Apr 2005 13:26:11 -0500 Subject: [CM] cmio problem In-Reply-To: <42739F70.2070502@woh.rr.com> References: <42737A5E.9030200@woh.rr.com> <32cc5009eb083eabe38e92aee5765962@uiuc.edu> <42738D24.2040302@woh.rr.com> <42738FC9.20203@woh.rr.com> <7f25ad1d2237245bc7dc6a2f178b3262@uiuc.edu> <42739F70.2070502@woh.rr.com> Message-ID: <2369cd3f91d716d45ee737aa40011094@uiuc.edu> I think CVS should be a bit more stable now, i tested midi and clm and generating .sco files. but didnt actually call the the new play on a csound file... ill have more to say about some nice additions when the dust settles, for now if you are using cvs head you should check doc/changelog.text each time it changes and expect bugs. will be revamping the html docs over the next few days. On Apr 30, 2005, at 10:08 AM, Dave Phillips wrote: > Hi Rick: > > Cool, thanks. I'll try to hold out until then... :) > > Best, > > dp From taube at uiuc.edu Sat Apr 30 12:44:19 2005 From: taube at uiuc.edu (Rick Taube) Date: Sat, 30 Apr 2005 14:44:19 -0500 Subject: [CM] downloading for OSX In-Reply-To: References: Message-ID: The easiest route is to download the drag-and-drop OSX application (CM.app) from sourceforge. The app contains clm-3, cmn, will write .mid and .sco files and will load midishare if you have it installed on your computer. CM.app uses Emacs.app and X11.app, both are free downloads -- see the CM.app readme for more information. http://prdownloads.sourceforge.net/commonmusic/cm_2.6.0-app-osx.dmg.gz? download On Apr 30, 2005, at 8:37 AM, giordai o laoire wrote: > dear folks > I want to run CM to a G4 Powerbook laptop to write both midi and > CSound .sco files and I intend to run Max/Msp on this machine as well. > I'm considering the M-Audio D/A convertor as hardware. Any opinions > out there? Also What's the simpliest downloading route for my > purposes, there seems quite a choice. Been using an older version for > OS9 for 4 yearso I'm outa touch, somewhat P.S. ordered NFTM from > Amazon as I really like CM, as I know it > yours > Giordai > > _________________________________________________________________ > Start dating right now with FREE Match.com membership! > http://match.msn.ie > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist From taube at uiuc.edu Sat Apr 30 12:46:41 2005 From: taube at uiuc.edu (Rick Taube) Date: Sat, 30 Apr 2005 14:46:41 -0500 Subject: [CM] downloading for OSX In-Reply-To: References: Message-ID: > touch, somewhat P.S. ordered NFTM from Amazon as I really like CM, as > I know it If you order directly from Routledge it will ship in days instead of months... http://www.routledge-ny.com/shopping_cart/products/product_detail.asp? sku=&isbn=9026519753&parent_id=&pc=