Re: [chuck-users] ChucK FLOSS - MIDI reference

2018-05-27 Thread Spencer Salazar
Hey Ben,

Wow, nice work getting all of the other chugins to compile. NHHall is a
brand new reverb designed/implemented by Nathan Ho, I don't think he
normally uses Windows so its missing Visual Studio build files. It has been
tested on Linux and Mac.

"no version function" sounds like ChucK has found the chugin file but
somehow it didnt compile correctly. There are a lot of reasons why this
could happen; Id be happy to take a look at your vcxproj file to see if
there are any obvious issues.

Spencer


On Sun, May 27, 2018 at 12:06 PM, Ben Sandvik  wrote:

> Jack's note that miniAudicle is only looking in C:\Program
> Files\ChucK\chugins\ ended up being the key here.  I now have some o the
> chugins installed and working :)  I had the 10/21/2015 .chug versions
> floating around my computer from 1.3.5.2, I made sure the 02/05/18 versions
> were in C:\Program Files\ChucK\chugins\ ( and the only versions in there,
> get the old ones out)
>
> The following are not automatically installed with 1.4.0.0:
> Binaural, Faust, Ladspa, NHHall, Random, Wavetable
>
> Below are the steps I took to get Binaural, Wavetable, and Random to
> compile and install.  Have not attempted Faust or Ladspa yet
>
> I could not get NHHall working with this method.  NHHall does not come
> with a VCXPROJ file so I used the VCXPROJ file from another chugin as a
> template and made my own for NHHall.  Using the steps below I was able to
> sucessfully build a .CHUG file for NHHall, but when trying to load the
> chugins in miniAudicle I get an error:
> [chuck]:(3:SEVERE):  |  |  | error loading chugin 'NHHall.chug', skipping
> [chuck]:(3:SEVERE):  |  |  | error from chuck_dl: 'no version function
> found in dll 'C:\Program Files\ChucK\chugins/NHHall.chug''
> Not sure if this is a problem with the NHHall files or user error on my
> part.
> Anyone have NHHall working on windows 10?
>
> Thanks
> Ben
>
> 
>
>
> After many days on stack overflow, trying to set up my laptop to use the
> VS 2010 build tools in the year 2018, I gave up and just tried stuff until
> I came up with this brute force method of installing the rest of the chugins
>
> Step 1:
> git clone https://github.com/ccrma/chugins.git
> the git repo will be placed in C:\Users\\chugins
> Open the makefile in C:\Users\\chugins, the first lines are a list
> of chugins in the order they will be built/installed in.  Put the chugin
> you want to install at the beginning, e.g. CHUGINS= Wavetable etc. ( This
> is just so that you don't have to go through the steps below for each of
> the chugins that are already installed).
>
>
> Step 2a:
> You might get the following error when running $ make win32:
> msbuild.exe /p:Configuration=Release
> process_begin: CreateProcess(NULL, msbuild.exe /p:Configuration=Release,
> ...) failed.
> make (e=2): The system cannot find the file specified.
>
> You need to find the directory containing msbuild.exe and add it the
> MINGW64 path, this worked for me:
>
> $ export PATH=$PATH:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319"
>
> Step 2b:
> Open the VCXPROJ file in C:\Users\\chugins\Wavetable, note that the
> first line indicates ToolsVersion="15.0"
> make sure you have the 15.0 buils tools for VS installed and that MINGW64
> can access the folder:
>
> $ export PATH=$PATH:"C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\MSBuild\15.0\Bin"
>
> Step 3:
> $ cd chugins
> $ make win32
>
> Although I had all the build tools, compilers, and SDKs for the v100
> platform toolset,  chugins would not compile and I couldn't get past the
> following error:
>
> error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset =
> 'v100') cannot be found.
>
> I noticed on the github history that there was a fix on 01/17/18 that
> changed the VCXPROJ file for each chugin from 
> v141
> to v100.
> So as an experiment I changed this back to 
> v141
> in the VCXPROJ file for the chugin (there are a few different lines of this
> in the file)
> NB: v141 did not work for each of them, for example Binaural needed v140
> to compile
>
> Step 4:
> run make win32 again.  Should get a 'build succeeded" in the log
>
> Step 5:
> make install. get the following error:
> $ make install
> CHUCK_STRICT=1 make -C Wavetabler/ install
> make[1]: Entering directory 'C:/Users/Ben/chugins/Wavetable'
> gcc -O3 -Werror -c -o Wavetable.o Wavetable.cpp
> process_begin: CreateProcess(NULL, gcc -O3 -Werror -c -o Wavetable.o
> Wavetable.cpp, ...) failed.
> make (e=2): The system cannot find the file specified.
>
> Step 6:
> move the contents of C:/Users//Wavetable/Release to
> C:/Users//Wavetable/ and change the file name of Wavetable.obj to
> Wavetable.o
>
> Step 7:
> run make install again. then move the Wavetable .CHUG file from
> C:/Users//chugins/Wavetable to C:\Program Files\ChucK\chugins
> Double check that C:\Program Files\ChucK\chugins is a directory for
> chugins in miniAudicle and re-start miniAudicle.  The 

Re: [chuck-users] ChucK FLOSS - MIDI reference

2018-05-27 Thread Ben Sandvik
Jack's note that miniAudicle is only looking in C:\Program
Files\ChucK\chugins\ ended up being the key here.  I now have some o the
chugins installed and working :)  I had the 10/21/2015 .chug versions
floating around my computer from 1.3.5.2, I made sure the 02/05/18 versions
were in C:\Program Files\ChucK\chugins\ ( and the only versions in there,
get the old ones out)

The following are not automatically installed with 1.4.0.0:
Binaural, Faust, Ladspa, NHHall, Random, Wavetable

Below are the steps I took to get Binaural, Wavetable, and Random to
compile and install.  Have not attempted Faust or Ladspa yet

I could not get NHHall working with this method.  NHHall does not come with
a VCXPROJ file so I used the VCXPROJ file from another chugin as a template
and made my own for NHHall.  Using the steps below I was able to
sucessfully build a .CHUG file for NHHall, but when trying to load the
chugins in miniAudicle I get an error:
[chuck]:(3:SEVERE):  |  |  | error loading chugin 'NHHall.chug', skipping
[chuck]:(3:SEVERE):  |  |  | error from chuck_dl: 'no version function
found in dll 'C:\Program Files\ChucK\chugins/NHHall.chug''
Not sure if this is a problem with the NHHall files or user error on my
part.
Anyone have NHHall working on windows 10?

Thanks
Ben




After many days on stack overflow, trying to set up my laptop to use the VS
2010 build tools in the year 2018, I gave up and just tried stuff until I
came up with this brute force method of installing the rest of the chugins

Step 1:
git clone https://github.com/ccrma/chugins.git
the git repo will be placed in C:\Users\\chugins
Open the makefile in C:\Users\\chugins, the first lines are a list of
chugins in the order they will be built/installed in.  Put the chugin you
want to install at the beginning, e.g. CHUGINS= Wavetable etc. ( This is
just so that you don't have to go through the steps below for each of the
chugins that are already installed).


Step 2a:
You might get the following error when running $ make win32:
msbuild.exe /p:Configuration=Release
process_begin: CreateProcess(NULL, msbuild.exe /p:Configuration=Release,
...) failed.
make (e=2): The system cannot find the file specified.

You need to find the directory containing msbuild.exe and add it the
MINGW64 path, this worked for me:

$ export PATH=$PATH:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319"

Step 2b:
Open the VCXPROJ file in C:\Users\\chugins\Wavetable, note that the
first line indicates ToolsVersion="15.0"
make sure you have the 15.0 buils tools for VS installed and that MINGW64
can access the folder:

$ export PATH=$PATH:"C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\MSBuild\15.0\Bin"

Step 3:
$ cd chugins
$ make win32

Although I had all the build tools, compilers, and SDKs for the v100
platform toolset,  chugins would not compile and I couldn't get past the
following error:

error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset =
'v100') cannot be found.

I noticed on the github history that there was a fix on 01/17/18 that
changed the VCXPROJ file for each chugin from
v141 to
v100.
So as an experiment I changed this back to
v141 in the VCXPROJ file for the chugin
(there are a few different lines of this in the file)
NB: v141 did not work for each of them, for example Binaural needed v140 to
compile

Step 4:
run make win32 again.  Should get a 'build succeeded" in the log

Step 5:
make install. get the following error:
$ make install
CHUCK_STRICT=1 make -C Wavetabler/ install
make[1]: Entering directory 'C:/Users/Ben/chugins/Wavetable'
gcc -O3 -Werror -c -o Wavetable.o Wavetable.cpp
process_begin: CreateProcess(NULL, gcc -O3 -Werror -c -o Wavetable.o
Wavetable.cpp, ...) failed.
make (e=2): The system cannot find the file specified.

Step 6:
move the contents of C:/Users//Wavetable/Release to
C:/Users//Wavetable/ and change the file name of Wavetable.obj to
Wavetable.o

Step 7:
run make install again. then move the Wavetable .CHUG file from
C:/Users//chugins/Wavetable to C:\Program Files\ChucK\chugins
Double check that C:\Program Files\ChucK\chugins is a directory for chugins
in miniAudicle and re-start miniAudicle.  The chugin should be working now,
at least avoiding the 'undefined type' error in miniAudicle.


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Wed, May 23, 2018 at 8:49 PM, Spencer Salazar 
wrote:

> The main difference between the two is that when I was looking to use
> MidiRW, it didnt/doesn't actually work and is just a shell around an
> unimplemented interface, so MidiFileIn was added, which mostly just maps to
> STK's implementation.
>
> Spencer
>
>
> On Wed, May 23, 2018 at 9:54 AM, Juan Reyes  

Re: [chuck-users] ChucK FLOSS - MIDI reference

2018-05-23 Thread Juan Reyes

Hi Michael, Mario,

Thanks a lot for the links. Need to try these classes, they look cleaner.

MidiFileIn inherits from STK also (sorry Gary but thanks!).

Not so sure about MidiRW either. Looks like it has methods to open,
close, read and write MIDI files. Seems to me that it is also used in
conjunction with MidiMsg. I guess its usage might be like opening and
manipulating audio files.

  Cheers,

  -- Juan





LiCK contains NoteOn/NoteOff/ControlChangeMidiMsg classes that
extend MidiMsg and hide some of the details.

https://github.com/heuermh/lick/tree/master/lick/midi

Here's an example of how they might be used

https://github.com/heuermh/lick/blob/master/lick/midi/AnimoogMidi.ck#L104


___
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users


Re: [chuck-users] ChucK FLOSS - MIDI reference

2018-05-22 Thread Michael Heuer
Hello Juan, Mario

LiCK contains NoteOn/NoteOff/ControlChangeMidiMsg classes that extend
MidiMsg and hide some of the details.

https://github.com/heuermh/lick/tree/master/lick/midi

Here's an example of how they might be used

https://github.com/heuermh/lick/blob/master/lick/midi/AnimoogMidi.ck#L104

Cheers,

   michael


On Tue, May 22, 2018 at 5:41 PM, mario buoninfante <
mario.buoninfa...@gmail.com> wrote:

> Hi Juan,
>
>
> thanks a lot for that. I forgot there was an example about it. despite I
> work quite a lot with MIDI in general, from both programming and musical
> purposes, I've almost never used MIDI files. so, honestly I've never paid
> attention to that example, mea culpa :)
>
> apart from that, now I'd like to know what are the differences between
> MidiFileIn and MidiRW. I'll dig a bit more into the source code. in the
> meanwhile I updated the ChucK FLOSS manual, with at least all the methods I
> found on the link you sent. I'll try to get the descriptions as well as
> soon as possible.
>
>
> cheers,
>
> Mario
>
>
>
> On 22/05/18 22:48, Juan Reyes wrote:
>
>> Hi Mario,
>>
>> Have used 'MidiFileIn' as per  '/examples/midi/playmidi.ck'
>>
>> Some documentation is on:
>> [1]  https://ccrma.stanford.edu/~spencer/ckdoc/io.html#MidiFileIn
>>
>> BTW, Thanks to Spencer for MidiFileIn'.
>>
>> Tricky parts are more related to MidiMsg and actual midifile
>> manipulation.  'playmidi.ck' only triggers noteOns from the MIDI file.
>> For NoteOffs another MidiMsg conditional (or filter for this kind of
>> data stream on file) needs to be added. Tempo can also be manipulated by
>> just hacking 'playmidi.ck' code.
>>
>> Certainly one needs to get fluent on MIDI messaging hexadecimal codes.
>> NoteOn is 0x90 and NoteOff is 0x80. NoteOffs are useful to get actual
>> note durations. Some STK Ugens sustain forever if you don't have
>> NoteOffs, -in fact wherever an ADSR is not used-.
>>
>> Below some code that works to get NoteOffs and for illustration
>> purposes. Can post all the code or email it, in case you need it.
>>
>> Thanks for the MIDI Reference chapter on the ChucK FLOSS manual.
>>
>>   -- Juan Reyes
>>
>>
>> //**//
>>
>> MidiFileIn min;
>> MidiMsg msg;
>>
>> 0 => int j;
>> time delta;
>> float beg;  // start midi note
>> 0.0 => float durat;
>>
>>  if((msg.data1 & 0xF0) == 0x90 && msg.data2 > 0 && msg.data3 > 0)
>> {
>> <<< j, "  NOTE-ON KEY:  ", msg.data2, "Velocity: ", msg.data3 >>>;
>> 1 +=> j;
>>  }
>>
>> if((msg.data1 & 0xF0) == 0x80)
>>  {
>>beg-last => durat;
>>  <<< "NOTE-OFF:  ",msg.data2, msg.data3, "start: ", beg, "  duration: ",
>> durat >>>;
>>
>> beg => last;
>> }
>>
>> //**//
>>
>>
>>
>>> at the moment there are info about MIDI also under the Event Reference,
>>> which I don't wanna touch for now. anyway, there are a couple of classes
>>> I've never seen before, MidiMsgIn, MidiMsgOut and MidiFileIn, has anyone
>>> ever used them?
>>>
>>>
> ___
> chuck-users mailing list
> chuck-users@lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
___
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users


Re: [chuck-users] ChucK FLOSS - MIDI reference

2018-05-22 Thread mario buoninfante

Hi Juan,


thanks a lot for that. I forgot there was an example about it. despite I 
work quite a lot with MIDI in general, from both programming and musical 
purposes, I've almost never used MIDI files. so, honestly I've never 
paid attention to that example, mea culpa :)


apart from that, now I'd like to know what are the differences between 
MidiFileIn and MidiRW. I'll dig a bit more into the source code. in the 
meanwhile I updated the ChucK FLOSS manual, with at least all the 
methods I found on the link you sent. I'll try to get the descriptions 
as well as soon as possible.



cheers,

Mario


On 22/05/18 22:48, Juan Reyes wrote:

Hi Mario,

Have used 'MidiFileIn' as per  '/examples/midi/playmidi.ck'

Some documentation is on:
[1]  https://ccrma.stanford.edu/~spencer/ckdoc/io.html#MidiFileIn

BTW, Thanks to Spencer for MidiFileIn'.

Tricky parts are more related to MidiMsg and actual midifile
manipulation.  'playmidi.ck' only triggers noteOns from the MIDI file.
For NoteOffs another MidiMsg conditional (or filter for this kind of
data stream on file) needs to be added. Tempo can also be manipulated 
by just hacking 'playmidi.ck' code.


Certainly one needs to get fluent on MIDI messaging hexadecimal codes.
NoteOn is 0x90 and NoteOff is 0x80. NoteOffs are useful to get actual
note durations. Some STK Ugens sustain forever if you don't have
NoteOffs, -in fact wherever an ADSR is not used-.

Below some code that works to get NoteOffs and for illustration
purposes. Can post all the code or email it, in case you need it.

Thanks for the MIDI Reference chapter on the ChucK FLOSS manual.

  -- Juan Reyes


//**//

MidiFileIn min;
MidiMsg msg;

0 => int j;
time delta;
float beg;  // start midi note
0.0 => float durat;

 if((msg.data1 & 0xF0) == 0x90 && msg.data2 > 0 && msg.data3 > 0)
{
<<< j, "  NOTE-ON KEY:  ", msg.data2, "Velocity: ", msg.data3 >>>;
1 +=> j;
 }

if((msg.data1 & 0xF0) == 0x80)
 {
   beg-last => durat;
 <<< "NOTE-OFF:  ",msg.data2, msg.data3, "start: ", beg, "  duration: ",
durat >>>;

beg => last;
}

//**//




at the moment there are info about MIDI also under the Event 
Reference, which I don't wanna touch for now. anyway, there are a 
couple of classes I've never seen before, MidiMsgIn, MidiMsgOut and 
MidiFileIn, has anyone ever used them?




___
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users


Re: [chuck-users] ChucK FLOSS - MIDI reference

2018-05-22 Thread Juan Reyes

Hi Mario,

Have used 'MidiFileIn' as per  '/examples/midi/playmidi.ck'

Some documentation is on:
[1]  https://ccrma.stanford.edu/~spencer/ckdoc/io.html#MidiFileIn

BTW, Thanks to Spencer for MidiFileIn'.

Tricky parts are more related to MidiMsg and actual midifile
manipulation.  'playmidi.ck' only triggers noteOns from the MIDI file.
For NoteOffs another MidiMsg conditional (or filter for this kind of
data stream on file) needs to be added. Tempo can also be manipulated by 
just hacking 'playmidi.ck' code.


Certainly one needs to get fluent on MIDI messaging hexadecimal codes.
NoteOn is 0x90 and NoteOff is 0x80. NoteOffs are useful to get actual
note durations. Some STK Ugens sustain forever if you don't have
NoteOffs, -in fact wherever an ADSR is not used-.

Below some code that works to get NoteOffs and for illustration
purposes. Can post all the code or email it, in case you need it.

Thanks for the MIDI Reference chapter on the ChucK FLOSS manual.

  -- Juan Reyes


//**//

MidiFileIn min;
MidiMsg msg;

0 => int j;
time delta;
float beg;  // start midi note
0.0 => float durat;

 if((msg.data1 & 0xF0) == 0x90 && msg.data2 > 0 && msg.data3 > 0)
{
<<< j, "  NOTE-ON KEY:  ", msg.data2, "Velocity: ", msg.data3 >>>;  
  
1 +=> j;
 }

if((msg.data1 & 0xF0) == 0x80)
 {
   beg-last => durat;
 <<< "NOTE-OFF:  ",msg.data2, msg.data3, "start: ", beg, "  duration: ",
durat >>>;

beg => last;
}

//**//




at the moment there are info about MIDI also under the Event 
Reference, which I don't wanna touch for now. anyway, there are a 
couple of classes I've never seen before, MidiMsgIn, MidiMsgOut and 
MidiFileIn, has anyone ever used them?



___
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users


Re: [chuck-users] ChucK FLOSS - MIDI reference

2018-03-24 Thread mario buoninfante

Hi Mitch,


thanks. I have to say I'm really happy to do that and honestly I should 
say thanks to ChucK developers and ChucK community, since for me (and 
for everyone else) this is an opportunity to learn a lot. It's amazing 
having the possibility to work on a FLOSS document (that of course 
hasn't been created by me) and at the same time check the source code 
(since is open source)


so thanks to the ChucK community.


cheers,

Mario


On 24/03/18 09:21, Mitch Kaufman wrote:

Mario,

I wanted to thank you for all your efforts in putting together this 
FLOSS manual.  There are many things covered here that are not covered 
elsewhere.  Thanks again.


Regards,
Mitch

Regards,
Mitch

*From:* chuck-users-boun...@lists.cs.princeton.edu 
<chuck-users-boun...@lists.cs.princeton.edu> on behalf of mario 
buoninfante <mario.buoninfa...@gmail.com>

*Sent:* Friday, March 23, 2018 3:31:23 PM
*To:* ChucK Users Mailing List
*Subject:* [chuck-users] ChucK FLOSS - MIDI reference
Hi,


I merged the new chapter with the Event one, I thought was the best
thing to do. so now everything is under the Event chapter like it was
before, which is simply been expanded.


cheer,

Mario



___
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users


___
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users


[chuck-users] ChucK FLOSS - MIDI reference

2018-03-23 Thread mario buoninfante

Hi,


I merged the new chapter with the Event one, I thought was the best
thing to do. so now everything is under the Event chapter like it was
before, which is simply been expanded.


cheer,

Mario

___
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users


[chuck-users] ChucK FLOSS - MIDI reference

2018-03-22 Thread Mario Buoninfante
Hi everybody,

I added a new chapter to the ChucK FLOSS manual, MIDI Reference

https://omnibook.pro/chuck/_full/#midi

at the moment there are info about MIDI also under the Event Reference,
which I don't wanna touch for now.
anyway, there are a couple of classes I've never seen before, MidiMsgIn,
MidiMsgOut and MidiFileIn, has anyone ever used them?

cheers,
Mario
___
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users