Re: [PD] midi file into [text sequence]?

2023-04-24 Thread Alexandre Torres Porres
Em dom., 23 de abr. de 2023 às 10:25, Linux ROUEN Normandie <
linux.ro...@free.fr> escreveu:

> It would be useful if both MIDI Sequencer objects can directly share the
> same Text format
>

there's no reason to use both, one should be enough for your needs, that
makes more sense. Also, I can't mess with [seq] and break it, so it's a big
NO for this.

cheers
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] midi file into [text sequence]?

2023-04-23 Thread Linux ROUEN Normandie

Hello Alexandre,

Yes, [else/midi] v.1.0.0 rc-7 can do it, but... It's Text format is not 
fully time-wise compatible with [cyclone/seq] v.0.7.0 output.


Examples using the same MIDI file saved as TEXTE file:
[else/midi] -> file.txt with delta time (ms) between 2 successive lines
39.0625 153 53 0;
46.875 151 84 0;
0 151 81 70;
13.0208 145 36 11;
5.20833 153 81 66;
0 177 1 0;
0 225 0 64;
39.0625 153 81 0;
65.1042 153 81 56;
39.0625 153 81 0;
65.1042 153 51 51;
39.0625 153 51 0;
65.1042 153 81 59;
39.0625 153 81 0;
0 145 36 0;
65.1042 153 81 58;

[cyclone/seq] -> file.txt with cumulative delta time (ms) from the 
beginning of the song

7565.1 153 53 0;
7611.98 151 84 0;
7611.98 151 81 70;
7625 145 36 11;
7630.21 153 81 66;
7630.21 177 1 0;
7630.21 225 0 64;
7669.27 153 81 0;
7734.37 153 81 56;
7773.44 153 81 0;
7838.54 153 51 51;
7877.6 153 51 0;
7942.71 153 81 59;
7981.77 153 81 0;
7981.77 145 36 0;
8046.87 153 81 58;

It would be useful if both MIDI Sequencer objects can directly share the 
same Text format, for both file.txt and object's [print output], so 
previous files.txt done with [cyclone/seq] can be directly reused with 
[else/midi].


Thanks.
- - - - - - -
Best, Joe
- - - - - - -

Le 22/04/2023 à 20:31, Alexandre Torres Porres a écrit :
Hi, the [else/midi] object can save a midi file to text in a format 
that can be used in [text].


Em sáb., 22 de abr. de 2023 às 10:00, Peter P. 
 escreveu:


Thanks Miller, Christof, Patko,

midi2sco looks really good, I also found midi2csv which does a similar
job, keeping the midi pitch notation but possibly specifying time in
midi ticks, hence needing some polishing of the results as well.

best, Peter

* Miller Puckette  [2023-04-22 13:26]:
> I've been using the "midi2sco" program to convert MIDI files to
csound
> scores and then either reading the csound straight into a text
object (read
> -c message so end-of-line terminates lists) - and/or writing
simple awk
> scripts to change csound pitch notation back into MIDI pitches
and convert
> times to milliseconds.
>
> cheers
>
> Miller
>
> On 4/22/23 12:57, Christof Ressi wrote:
> > You can read the MIDI file with [mrpeach/midifile], output
everything in
> > a loop and save the MIDI messages in a [text] object. You just
need to
> > calculate the appropriate time delta between messages.
> >
> > Christof
> >
> > On 22.04.2023 07:46, Peter P. wrote:
> > > Hi,
> > >
> > > starting to use [text sequence] instead of [qlist] more and
more, I am
> > > wondering how difficult it might be to write an external
script that
> > > converts .mid file into .txt usable by [textfile sequence]?
> > >
> > > Has anyone attempted something similar already? What would
be the
> > > easiest language and/or libraries to do this on DebianGNU Linux?
> > >
> > > Thanks!
> > > Peter
> > >
> > > ___
> > > Pd-list@lists.iem.at mailing list
> > > UNSUBSCRIBE and account-management ->

https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-list__;!!Mih3wA!FX8XWZP4VHyBnFI5axOis2enTs45LT8_Vo4SMqvp-FvMqA5qk59VeeqWL6VVeoi70CbHzKynWW-sEg$
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] midi file into [text sequence]?

2023-04-23 Thread Dan Wilcox
There is also the [c_seqplay] abstraction in rjlib which can playback txt files 
output from [seq] by Max or Cyclone's seq. It's pure vanilla, so once you have 
done the conversion, you don't need additional externals for playing. It was 
written before [text] and uses [textfile] so maybe useful to examine as a 
reference?

https://github.com/rjdj/rjlib <https://github.com/rjdj/rjlib>

That being said, I also use mrpeach midifile to work with MIDI directly. I have 
a wrapper, [c_midiplay], in my rc-bastractions which outputs to the internal 
messaging so you can receive events visa the traditional [notein], [ctlin], etc 
objects:

https://github.com/danomatika/rc-patches 
<https://github.com/danomatika/rc-patches>

> On Apr 22, 2023, at 12:00 PM, pd-list-requ...@lists.iem.at wrote:
> 
> Message: 1
> Date: Sat, 22 Apr 2023 07:46:28 +0200
> From: "Peter P." mailto:peterpar...@fastmail.com>>
> To: pd-list@lists.iem.at <mailto:pd-list@lists.iem.at>
> Subject: [PD] midi file into [text sequence]?
> Message-ID: <20230422054628.vf2qzum6s2yxr...@fastmail.com 
> <mailto:20230422054628.vf2qzum6s2yxr...@fastmail.com>>
> Content-Type: text/plain; charset=us-ascii
> 
> Hi,
> 
> starting to use [text sequence] instead of [qlist] more and more, I am
> wondering how difficult it might be to write an external script that
> converts .mid file into .txt usable by [textfile sequence]?
> 
> Has anyone attempted something similar already? What would be the
> easiest language and/or libraries to do this on DebianGNU Linux?
> 
> Thanks!
> Peter


Dan Wilcox
@danomatika <http://twitter.com/danomatika>
danomatika.com <http://danomatika.com/>
robotcowboy.com <http://robotcowboy.com/>



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] midi file into [text sequence]?

2023-04-22 Thread Peter P.
Thanks Miller, Christof, Patko,

midi2sco looks really good, I also found midi2csv which does a similar
job, keeping the midi pitch notation but possibly specifying time in
midi ticks, hence needing some polishing of the results as well.

best, Peter

* Miller Puckette  [2023-04-22 13:26]:
> I've been using the "midi2sco" program to convert MIDI files to csound
> scores and then either reading the csound straight into a text object (read
> -c message so end-of-line terminates lists) - and/or writing simple awk
> scripts to change csound pitch notation back into MIDI pitches and convert
> times to milliseconds.
> 
> cheers
> 
> Miller
> 
> On 4/22/23 12:57, Christof Ressi wrote:
> > You can read the MIDI file with [mrpeach/midifile], output everything in
> > a loop and save the MIDI messages in a [text] object. You just need to
> > calculate the appropriate time delta between messages.
> > 
> > Christof
> > 
> > On 22.04.2023 07:46, Peter P. wrote:
> > > Hi,
> > > 
> > > starting to use [text sequence] instead of [qlist] more and more, I am
> > > wondering how difficult it might be to write an external script that
> > > converts .mid file into .txt usable by [textfile sequence]?
> > > 
> > > Has anyone attempted something similar already? What would be the
> > > easiest language and/or libraries to do this on DebianGNU Linux?
> > > 
> > > Thanks!
> > > Peter
> > > 
> > > 
> > > 
> > > ___
> > > Pd-list@lists.iem.at mailing list
> > > UNSUBSCRIBE and account-management -> 
> > > https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-list__;!!Mih3wA!FX8XWZP4VHyBnFI5axOis2enTs45LT8_Vo4SMqvp-FvMqA5qk59VeeqWL6VVeoi70CbHzKynWW-sEg$
> > 
> > 
> > 
> > 
> > ___
> > Pd-list@lists.iem.at mailing list
> > UNSUBSCRIBE and account-management -> 
> > https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-list__;!!Mih3wA!FX8XWZP4VHyBnFI5axOis2enTs45LT8_Vo4SMqvp-FvMqA5qk59VeeqWL6VVeoi70CbHzKynWW-sEg$
> 
> 
> 
> 
> ___
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> https://lists.puredata.info/listinfo/pd-list



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] midi file into [text sequence]?

2023-04-22 Thread Miller Puckette
I've been using the "midi2sco" program to convert MIDI files to csound 
scores and then either reading the csound straight into a text object 
(read -c message so end-of-line terminates lists) - and/or writing 
simple awk scripts to change csound pitch notation back into MIDI 
pitches and convert times to milliseconds.


cheers

Miller

On 4/22/23 12:57, Christof Ressi wrote:
You can read the MIDI file with [mrpeach/midifile], output everything 
in a loop and save the MIDI messages in a [text] object. You just need 
to calculate the appropriate time delta between messages.


Christof

On 22.04.2023 07:46, Peter P. wrote:

Hi,

starting to use [text sequence] instead of [qlist] more and more, I am
wondering how difficult it might be to write an external script that
converts .mid file into .txt usable by [textfile sequence]?

Has anyone attempted something similar already? What would be the
easiest language and/or libraries to do this on DebianGNU Linux?

Thanks!
Peter



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-list__;!!Mih3wA!FX8XWZP4VHyBnFI5axOis2enTs45LT8_Vo4SMqvp-FvMqA5qk59VeeqWL6VVeoi70CbHzKynWW-sEg$ 





___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-list__;!!Mih3wA!FX8XWZP4VHyBnFI5axOis2enTs45LT8_Vo4SMqvp-FvMqA5qk59VeeqWL6VVeoi70CbHzKynWW-sEg$ 





___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] midi file into [text sequence]?

2023-04-22 Thread Christof Ressi
You can read the MIDI file with [mrpeach/midifile], output everything in 
a loop and save the MIDI messages in a [text] object. You just need to 
calculate the appropriate time delta between messages.


Christof

On 22.04.2023 07:46, Peter P. wrote:

Hi,

starting to use [text sequence] instead of [qlist] more and more, I am
wondering how difficult it might be to write an external script that
converts .mid file into .txt usable by [textfile sequence]?

Has anyone attempted something similar already? What would be the
easiest language and/or libraries to do this on DebianGNU Linux?

Thanks!
Peter



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list




___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] midi file into [text sequence]?

2023-04-22 Thread Patko nytkophilus
If tout are familiar with f# scripting you may like to try this library:
https://github.com/smoothdeveloper/zcore-midi-fs

Le sam. 22 avr. 2023, 11:12, Patko nytkophilus  a
écrit :

> Hello, I'm using mrpeach/midifile and I'm happy with it. Sometimes I
> process the output or read the content of midifile with text buffers, and
> write back to midifile.
>
> Le sam. 22 avr. 2023, 07:53, Peter P.  a écrit :
>
>> Hi,
>>
>> starting to use [text sequence] instead of [qlist] more and more, I am
>> wondering how difficult it might be to write an external script that
>> converts .mid file into .txt usable by [textfile sequence]?
>>
>> Has anyone attempted something similar already? What would be the
>> easiest language and/or libraries to do this on DebianGNU Linux?
>>
>> Thanks!
>> Peter
>>
>>
>>
>> ___
>> Pd-list@lists.iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> https://lists.puredata.info/listinfo/pd-list
>>
>
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] midi file into [text sequence]?

2023-04-22 Thread Patko nytkophilus
Hello, I'm using mrpeach/midifile and I'm happy with it. Sometimes I
process the output or read the content of midifile with text buffers, and
write back to midifile.

Le sam. 22 avr. 2023, 07:53, Peter P.  a écrit :

> Hi,
>
> starting to use [text sequence] instead of [qlist] more and more, I am
> wondering how difficult it might be to write an external script that
> converts .mid file into .txt usable by [textfile sequence]?
>
> Has anyone attempted something similar already? What would be the
> easiest language and/or libraries to do this on DebianGNU Linux?
>
> Thanks!
> Peter
>
>
>
> ___
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
> https://lists.puredata.info/listinfo/pd-list
>
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


[PD] midi file into [text sequence]?

2023-04-21 Thread Peter P.
Hi,

starting to use [text sequence] instead of [qlist] more and more, I am
wondering how difficult it might be to write an external script that
converts .mid file into .txt usable by [textfile sequence]?

Has anyone attempted something similar already? What would be the
easiest language and/or libraries to do this on DebianGNU Linux?

Thanks!
Peter



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list