Re: [chuck-users] Raspberry pi and ChucK and performance

2014-01-11 Thread Perry Cook
Thoughts from the battlefield: One nice thing about the Pi is that it supports many sample rates. So if you can run at 22.05k or even 16k or less, then you'll get much more bang for your buck. Also, you might look into using WvIn (non looping) or WavLoop (looping), rather than SndBuf,

Re: [chuck-users] WvOut format (Spencer Salazar)

2014-06-14 Thread Perry Cook
Ok, I just tried this on Windoze 8.1 Pro. Newest installer from The ChucK/mini download page. Ran both command line and miniAudicle. Audacity, QuickTime player, iTunes, and my own sndview (DOSBox based sound/spectrum viewer, First created in 1988, migrated forward since) all read and play the

[chuck-users] . Re: Chuck's capture of Midi broken? (Daniel Chapiro)

2014-09-15 Thread Perry Cook
Could we be looking at a running status problem? It's legal in MIDI to skip the status byte if it doesn't change. Not sure how ChucK/RTMidi handle this. I sold my WX7, or I'd check it. Prc ___ chuck-users mailing list

Re: [chuck-users] Heavy distortion/clipping in Windows

2015-02-19 Thread Perry Cook
Ack! This is a common problem, and I thought I had caught all of the clipping/distortion cases on Windows/Linux with our last passes on checking the source code. I'll check it all again and put it in our Errata file for future ChucK/Mini releases, and future printings of the book. As others

Re: [chuck-users] ChucK on Yosemite

2015-03-13 Thread Perry Cook
I'm using the hell out of it on Yosemite. Only problems I've observed are: Something odd going on with Processing sending OSC to ChucK. It works sometimes, then not. Something odd going on with networked pieces like CliX, Gamelan, etc. Possibly a new machine/firewall settings issue rather than

Re: [chuck-users] is shred running? (Atte)

2015-03-04 Thread Perry Cook
Atte, A handy list of Shred functions (From our new Book, Appendix A :-): The ones you want are running() or done() Shred.fromId(int id) Returns shred object corresponding to id. int id(); Returns the ID number of the shred. void yield(); Causes the shred to temporarily discontinue

Re: [chuck-users] Heavy distortion/clipping in Windows (Kassen)

2015-02-25 Thread Perry Cook
: cak4g45dtccjruewivmckrhnlcne6s3me5__oqoozfm20ner...@mail.gmail.com Content-Type: text/plain; charset=utf-8 On 19 February 2015 at 18:59, Perry Cook p...@cs.princeton.edu wrote: Ack! This is a common problem, and I thought I had caught all of the clipping/distortion cases on Windows/Linux with our last

Re: [chuck-users] kb hid problems

2015-11-01 Thread Perry Cook
This is really odd, because I have two Yosemite machines that work fine with your posted code. I’m trying to figure which of my Macs I want to subject to the ElCap upgrade, and will test on that and report. For fun, have you tried the other non-hid keyboard device example? This one suffers from

[chuck-users] Mesh2D for Windows

2015-11-27 Thread Perry Cook
Calling all Windows Hax@rs. I have discovered (thanks to someone in the online Physics-Based DSP course) that the Mesh2D chugin that’s distributed with the Windows installer is different from that shipped for Mac. (Haven’t checked Linux yet). Unacceptable behaviors include myMesh.x and

Re: [chuck-users] all pass filters (Michael Heuer)

2015-11-25 Thread Perry Cook
ChucK definitely has all you need! ChucK is “DSP Complete” (like Turing Complete for computational engines/languages), because since ChucK allows for single-sample connections and manipulations, then we don’t provide lots of flavors of things. You can build from primitives. Like a RISC

Re: [chuck-users] Communicate with a C++ programme (Guille Elias Alonso)

2016-05-12 Thread Perry Cook
It’s pretty old-school, but often my solution for this is to pipe text output of ChucK into stdin of the Cxx program in a terminal. You need to be sure to send to chout and not just use the <<< “PRINT THIS” >>>; form, because the latter prints to stderr, not stdout. Here’s a simple ChucK

Re: [chuck-users] Set adc sampling rate

2016-05-14 Thread Perry Cook
In miniAudicle, it’s in the Preferences window. In terminal, the --srate switch sets sample rate: > chuck --srate8000 MyChucK.ck But both ADC and DAC must run at same rate. AND there has to be supporting hardware there to run at that sample rate. So native Mac coreaudio won’t allow for

Re: [chuck-users] Any search function in MiniAudicle

2016-05-15 Thread Perry Cook
Lars Wrote: > Is there any search function in Mini audicle? > > Thanks! Within a file in the editor, standard -F Find, replace, replace all, next, etc. work as with any text editor. Were you hoping for a more multi-file search functionality? PRC

Re: [chuck-users] Extending Chugens and Chubgraphs (many sources)

2016-07-06 Thread Perry Cook
(Michael wrote) > > The ChucK source is here > > https://github.com/ccrma/chuck > > As far as documentation goes, there's not really much to Chubgraphs and > Chugens, just chuck inlet to outlet with something in between or override > fun float tick(float in), respectively. > > michael Yep

Re: [chuck-users] Loading ChuGins (from Daniel Meowington)

2017-11-29 Thread Perry Cook
I don’t have your environment, but some directory should do the trick. On my Mac, it’s in /usr/lib/chuck For now, you could try loading the specific ChuGin by name at runtime: chuck -chugin: yourchuckfiles.ck I put the chugin I want right in the same directory just to make sure. Hope

[chuck-users] ChucK Getting Started (RE to Sheri W-J)

2018-01-15 Thread Perry Cook
Hey Sheri, The book is available in EBook form from the publisher (Manning) here: https://www.manning.com/books/programming-for-musicians-and-digital-artists There is also an intro to programming in ChucK video course on Kadenze here:

Re: [chuck-users] stereo gain (henrique matias)

2018-10-14 Thread Perry Cook
You’ll need to connect your gain explicitly to channel 32 as well. Gain is a mono UG, but there’s special treatment when connecting any mono UG to the system default stereo dac. Note that if you want true “stereo” gain control or panning, you can do: Gain g[2] => dac; or Pan2 p => dac;

Re: [chuck-users] Sine Wavetable (Mario B.)

2018-10-23 Thread Perry Cook
I’ve done this a lot. Just make a nicely oversampled single-cycle sine .wav file and use SndBuf. You’ll need a .freq function that does the right thing based on how many samples are in your wavetable. I think you can also use GenX to do it. Prc Sent from my iPhone > On Oct 23, 2018, at

[chuck-users] Fauck Issues

2019-01-27 Thread Perry Cook
I didn’t look at the verbose log, but it looks like maybe it can’t find the chugin. I’ve been having some trouble getting command line chuck to find the factory chugins. One way seems to be to have the .chug in the local directory, and specify it on the command line. Prc Sent from my iPhone

Re: [chuck-users] Date and Time (Mario)

2019-04-03 Thread Perry Cook
Very interesting question, and I don’t know. In case the answer comes back no tho: I’ve done this by launching with the start time in a command line argument. Then added “now” to that to get current time. Prc Sent from my iPhone > On Apr 3, 2019, at 9:00 AM,

Re: [chuck-users] Chuck Coding Style (Charlie)

2019-04-01 Thread Perry Cook
Perhaps the Chuck Book might at least provide good examples. I don’t know of a formal style guide. I think we authors, while differing from each other, generally use OOP conventions we brought from C++, Java, (and myself) Objective C and Smalltalk. Prc Sent from my iPhone > On Apr 1,

Re: [chuck-users] adc in terminal (Rob Hamilton asks)

2020-03-03 Thread Perry Cook
Do a —probe to see how many adcs (and dacs) are there. Then try command line forcing to that adc. I find that if I’ve recently airplayed, or forget I have soundsource enabled, or sound flower, or some other real/virtual adc/dac, sometimes those are sticky in system audio and ChucK defaults to

Re: [chuck-users] Global Variables (herman asked)

2020-02-27 Thread Perry Cook
You script got scrubbed for some reason, but I suspect that you’re shadowing the global somehow locally (if you use the same name as an argument or a local within a function, it masks the global version). Here’s a simple example of using a global: 1000 => float freqGlob; // global frequency

Re: [chuck-users] SndBuf use of .loop and .interp (herman asked)

2020-02-27 Thread Perry Cook
.interp doesn’t do what you think it does. It just specifies the type of internal interpolation for smoothing of playback (only applicable for non 1.0 rates). SndBuf .loop just tells it to start over at the beginning when it reaches the end (or end after reaching the beginning): SndBuf s =>

Re: [chuck-users] Multichannel Mono Output using ChucK (Matthew.Noone)

2020-01-30 Thread Perry Cook
The trick here is you also have to tell ChucK to be 4 channels. From the command line: chuck -c8 YourFile.ck depending on what your —probe shows, you might even have to specify which dac (and adc) to use, especially if they’re different device numbers or channel numbers. Also, might need to up

Re: [chuck-users] playing SndBuf backward

2020-02-12 Thread Perry Cook
specific > than "Re: Contents of chuck-users digest..." > > > Today's Topics: > > 1. Re: playing SndBuf backward (Perry Cook) > 2. Error in book "Programming for Musicians and digital artists > by Ge Wang" ? (herman verbaeten) > 3. playing

Re: [chuck-users] Float to Int

2020-01-21 Thread Perry Cook
We also added Std.ftoi(x) to the language a while back (at 1.3.2.0). It’s much clearer to read, and more obvious as to what’s going on and why, than the casting notation. To round, just add 0.5 to x in the function arg. so: > Std.ftoi(0.4*myBuf.samples()+0.5) => myBuf.pos; would set your

Re: [chuck-users] MultiTap delay

2020-01-07 Thread Perry Cook
The parallel multi-delay and multi-tap single delay line are identical in function. Delays are linear so they can be factored any way you like and as long as the impulse response is the same, it’s a duck. I use the multi delay version myself. Wastes memory, but who cares. Prc Sent from my

Re: [chuck-users] float to int

2020-03-10 Thread Perry Cook
Also, A more obvious and Java-like way to convert float to int is the built-in function: Std.ftoi(myFloat) => int myInt; Sent from my iPhone > On Mar 10, 2020, at 8:51 AM, chuck-users-requ...@lists.cs.princeton.edu wrote: > > Send chuck-users mailing list submissions to >

Re: [chuck-users] sndBuf.valueAt (Forrest Curo asks)

2020-04-19 Thread Perry Cook
This is truly odd. I don’t have easy means to test it. I don’t know why it wouldbe broken dependent on the dac, however. For fun you might try something like this, just to verify that the valueAt() function is what’s busted. SndBuf s => blackhole; “Fred.wav” => s.read; while (s.pos() <

Re: [chuck-users] Multi-channel weirdness (mike clew)

2020-05-14 Thread Perry Cook
what does chuck —probe print out? Maybe you’re connecting to the wrong dac?? For reference, here’s an invocation script I used last time I did a multichannel performance: chuck -c8 -bufsize2048 -in2 --dac1 --adc0 INIT.ck That would have been an older version of chuck, but it worked then.

Re: [chuck-users] Machine.add() (.yield) from mike clemow

2020-07-02 Thread Perry Cook
Depending on how HUGE the SndBuf files are, I have often loaded all of the files sequentially at the beginning, before I make any sound at all, into a single SndBuf, not to play them, but to get them into the cache. Then when the time comes to truly load them, they can be zero-disk loads. If

Re: [chuck-users] imports/includes (Curtis Ullerich)

2020-08-16 Thread Perry Cook
So if I understand you correctly, this is solved fairly easily by a structure we propose in the "ChucK Book” 1) Create a file that loads (by Machine.add()) all the classes you think you’ll need. 2) As the last line of that, have it Machine.add() a different file, which then either does the

[chuck-users] Mic on Mini on Mojave+

2021-03-01 Thread Perry Cook
Hi all, Since Mojave, MacOS has instituted increasing security restrictions on Mic (and Camera) use. One of my Mojave machines at least launched the “MiniAudicle wants access to your microphone” dialog, and Mini now shows up in the Security pane of System Preferences. BUT, opening adc with