Zxpand+ with Midi.

ZX-Team Forum
moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 20.03.2018, 15:43

siggi hat geschrieben:
19.03.2018, 23:12
Hi Moggy
I made a .OOG file (USB-Stick->ZX81->Midi->YM->Headphone-Out->Mic-In->Notebook), because my Audacity does not have a MP3 licensed module.
Hope that sounds good enough: test.zip

I was not able to speed up playing any more. Maybe now the speed-limit is not given by the C program, but other parameters (like the speed of reading the file from USB stick: done by bit-banging to implement an SPI interface, which the ZX81 does not have).
Despite the speed is a little bit too slow, I think it sounds good :wink:

Regards
Siggi
YES YES YES this better! :D

Overall the entire piece is still a bit too slow, BUT THE TEMPOS ARE BEING OBEYED WHICH IS GREAT PROGRESS!!! :mrgreen:

For many of the MIDI files involved this would not be too problematic but the important thing here is that the player is doing what it should do.

Excellent work. :D

moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 20.03.2018, 16:10

siggi hat geschrieben:
20.03.2018, 13:54
Hi Moggy
yesterday I played the attached song from Pink Floyd: it is played totally wrong.
The "Tempo" setting is processed, but probably not correct.

I adapted the timing (I found in the player source) from Atmel 8MHz timing (1 us clock???) to Zeddy timing (64 us clock). But it sounds ugly.
I tried to understand the time calculations used for the Atmel timing, but do not understand it. Thus I will do my own calculation now :mrgreen:

Does this site describe the MIDI timing correct?
http://www.deluge.co/?q=midi-tempo-bpm

Regards
Siggi
The link is a good one and further info can be found here...
http://www.harfesoft.de/aixphysik/sound ... itmcn.html

I will play this file tonight but just a brief glance at the opening tempo looks odd..Tempo, 2857142.
This is the tempo of funeral music!! But I will check and get back to it tonight.


As I see it the main thing a player has to do is send out the data at 31.2k in a good steady stream into a module/keyboard (+- 1% I believe is the accepted standard) as the note timing already exists in the MIDI file itself even allowing for poor composers making badly timed MIDI files or those that are over quantised.( all notes snapped to a common starting point or aligned to a grid) as long as you can make the player send out this stream at that rate then all should be well now that we also know it is following the tempo track correctly.

You say the Pink Floyd file sounds "ugly" I have to repeat again Siggi that many times the fault lies in the original file and how it was created and it is not necessarily your player which, having heard Rhapsody in blue,sounds good to me.
Logic dictates that if a complex file like this sounds good and plays correctly then any file which sounds bad is just that, a bad file of which there are many.

Benutzeravatar
siggi
User
Beiträge: 2383
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: Zxpand+ with Midi.

Beitrag von siggi » 20.03.2018, 16:40

moggy hat geschrieben:
20.03.2018, 16:10
siggi hat geschrieben:
20.03.2018, 13:54
Hi Moggy
yesterday I played the attached song from Pink Floyd: it is played totally wrong.
The "Tempo" setting is processed, but probably not correct.

I adapted the timing (I found in the player source) from Atmel 8MHz timing (1 us clock???) to Zeddy timing (64 us clock). But it sounds ugly.
I tried to understand the time calculations used for the Atmel timing, but do not understand it. Thus I will do my own calculation now :mrgreen:

Does this site describe the MIDI timing correct?
http://www.deluge.co/?q=midi-tempo-bpm

Regards
Siggi
The link is a good one and further info can be found here...
http://www.harfesoft.de/aixphysik/sound ... itmcn.html

I will play this file tonight but just a brief glance at the opening tempo looks odd..Tempo, 2857142.
This is the tempo of funeral music!! But I will check and get back to it tonight.


As I see it the main thing a player has to do is send out the data at 31.2k in a good steady stream into a module/keyboard (+- 1% I believe is the accepted standard) as the note timing already exists in the MIDI file itself even allowing for poor composers making badly timed MIDI files or those that are over quantised.( all notes snapped to a common starting point or aligned to a grid) as long as you can make the player send out this stream at that rate then all should be well now that we also know it is following the tempo track correctly.

You say the Pink Floyd file sounds "ugly" I have to repeat again Siggi that many times the fault lies in the original file and how it was created and it is not necessarily your player which, having heard Rhapsody in blue,sounds good to me.
Logic dictates that if a complex file like this sounds good and plays correctly then any file which sounds bad is just that, a bad file of which there are many.
Hi Moggy
Pink Floyd sounds quite "normal"(compared to the stored WAV in my head, stored some years ago as backup of the black disk, rotating on my not-digital player :mrgreen: ), when played with the WIN standard sound player. It sounds totally different (totally other timing) and thus "ugly", when played on my player. So there seems to be a different handling of the timings, leading to different results (good or ugly).

Maybe "complex" sounds do not contain "simple" things, which could result in those effects?

EDIT: Just an idea: are some timings in this song maybe outside the valid (usual) range (which may be tolerated by the win player and lead to nonsense in my player)?
Mein ZX81-Web-Server: online seit 2007
http://zx81-siggi.endoftheinternet.org/index.html

Datenkraken bitte nicht füttern!

moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 20.03.2018, 17:33

Just a quick reply Siggi.

I notice the zip file contains a CSV file not the original MIDI file.
I thought the Atmel player used original MIDI file not a converted one? If the original MIDI is now playing slow with the Atmel player then I would guess the data rate is too slow because if the WIN player plays correct speed then the same should be with the Atmel player. The only difference you may notice is the sounds of the instruments which is Yamaha in the case of your keyboard and Roland in the case of WIN player otherwise the speed should be the same.

If the file is a converted one then the conversion process may be at fault or working with a different "clock"(I also have a few conversions I am not happy with)this I will check tonight.

Either way a brief glance at the files content shows it to be a simple one so should behave accordingly. The reason I use Rhapsody in blue is that it uses all channels, has a lot of controller data flowing and many tempo changes so if a player can handle this it can handle anything and your player just about hits the spot. :D

Benutzeravatar
siggi
User
Beiträge: 2383
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: Zxpand+ with Midi.

Beitrag von siggi » 20.03.2018, 19:18

moggy hat geschrieben:
20.03.2018, 17:33
Just a quick reply Siggi.

I notice the zip file contains a CSV file not the original MIDI file.
I thought the Atmel player used original MIDI file not a converted one? If the original MIDI is now playing slow with the Atmel player then I would guess the data rate is too slow because if the WIN player plays correct speed then the same should be with the Atmel player. The only difference you may notice is the sounds of the instruments which is Yamaha in the case of your keyboard and Roland in the case of WIN player otherwise the speed should be the same.

If the file is a converted one then the conversion process may be at fault or working with a different "clock"(I also have a few conversions I am not happy with)this I will check tonight.

Either way a brief glance at the files content shows it to be a simple one so should behave accordingly. The reason I use Rhapsody in blue is that it uses all channels, has a lot of controller data flowing and many tempo changes so if a player can handle this it can handle anything and your player just about hits the spot. :D
Hi Moggy
all players used the MIDI file (I will attach it). I used the MIDICVS tool from Charlie's batch file to make it readable for me (I am not an expert like you, who can see a wrong bit inside the MIDI file directly ;-) )
I checked for Tempo and Time events ...
Dateianhänge
PFDIAM.zip
(26.53 KiB) 27-mal heruntergeladen
Mein ZX81-Web-Server: online seit 2007
http://zx81-siggi.endoftheinternet.org/index.html

Datenkraken bitte nicht füttern!

moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 20.03.2018, 21:51

Hi Siggi.

The main problem with the Pink Floyd file is that it is a GS or General Standard file which is meant to be used on Roland equipment whereas what we posses is GM or General MIDI equipment.

What this means to us is that some of the note assignments are wrong for GM (They are meant to access extra or different tones on Roland equipment)

When played back on our GM equipment some of the tones are missing but when used with WIN media player these tones are sounded because the WIN media player MIDI bank is based on the Roland GS sound canvas so all tones sound.

I have included 2 GM versions of the track, the second one diamond 2 has the better instruments in my opinion and sounds good even on a Casio!! But more importantly for us should play well on your MIDI player and obey the tempo changes even allowing for the fact the player is a tiny bit slow which should not be too much of a worry at this stage.
Dateianhänge
diamond.zip
(159.4 KiB) 28-mal heruntergeladen

Benutzeravatar
siggi
User
Beiträge: 2383
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: Zxpand+ with Midi.

Beitrag von siggi » 22.03.2018, 00:17

siggi hat geschrieben:
18.03.2018, 12:17
moggy hat geschrieben:
12.03.2018, 15:49
Hi Siggi.

Many thanks for taking the time for this. :D

The reason I chose this file is because the xpand struggles badly with it when converted and I was hoping that your method of playing the file would cure it.

The file should take about 16 minutes when played via a PC based sequencer which will read the conductor track and any controller information separately from the note information.
Current state is: the new "True MIDI-Player" (using Midi-Files Version 0) is playing that within approx. 21 minutes ...
New state:
If i measured correctly (verification coming soon) the duration is now 16 min 52 sec (including silence in the beginning and end) :mrgreen:

Bugs removed:
- delay routine wasted (in medium) 32 usec on each call (even when called for 0 delay)
- NMI counter setup routine made garbage for long midi-ticks/slow music (rollover from A' register counting upwards from negative values to higher counter bytes counting downwards from positive values was not handled correctly and intial values were not setup correct and completely). Now known bugs are removed :wink:

Nevertheless Pink Floyds Diamonds does not run at correct speed. I found, that the midi file contains a meta-event 0x58 (Time signature), which is not handled by the player. How should it be handled?

Siggi
Mein ZX81-Web-Server: online seit 2007
http://zx81-siggi.endoftheinternet.org/index.html

Datenkraken bitte nicht füttern!

moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 22.03.2018, 17:01

siggi hat geschrieben:
22.03.2018, 00:17
siggi hat geschrieben:
18.03.2018, 12:17
moggy hat geschrieben:
12.03.2018, 15:49
Hi Siggi.

Many thanks for taking the time for this. :D

The reason I chose this file is because the xpand struggles badly with it when converted and I was hoping that your method of playing the file would cure it.

The file should take about 16 minutes when played via a PC based sequencer which will read the conductor track and any controller information separately from the note information.
Current state is: the new "True MIDI-Player" (using Midi-Files Version 0) is playing that within approx. 21 minutes ...
New state:
If i measured correctly (verification coming soon) the duration is now 16 min 52 sec (including silence in the beginning and end) :mrgreen:

Bugs removed:
- delay routine wasted (in medium) 32 usec on each call (even when called for 0 delay)
- NMI counter setup routine made garbage for long midi-ticks/slow music (rollover from A' register counting upwards from negative values to higher counter bytes counting downwards from positive values was not handled correctly and intial values were not setup correct and completely). Now known bugs are removed :wink:

Nevertheless Pink Floyds Diamonds does not run at correct speed. I found, that the midi file contains a meta-event 0x58 (Time signature), which is not handled by the player. How should it be handled?

Siggi
Congratulations Siggi I think this a good result, a few seconds over 16 minutes is nothing to bother ourselves over. :D

As for diamonds which version your file or the ones I posted? Either way I will run these through my Pi sequencer and dig a bit deeper into them.

Do not worry about the time signature because for ordinary MIDI playback this has no effect and is used primarily for sequencers and their score/notation routines which rely on the signature to place the"dots" correctly for score printing,MIDI players lack this facility so ignore it. Only my player which plays converted MIDI files could be upset by wrong information made during conversion whereas your player using a standard MIDI file should be playing correctly like Rhapsody in blue.

Benutzeravatar
siggi
User
Beiträge: 2383
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: Zxpand+ with Midi.

Beitrag von siggi » 22.03.2018, 21:06

Hi Moggy
I used the original Diamonds version. The PC runs it at correct speed. So I think the Zeddy cans also do it :mrgreen:
I will check my NMI based timer this weekend using a scope. Maybe it is doing something different to that I meant it should do .. :roll:
Mein ZX81-Web-Server: online seit 2007
http://zx81-siggi.endoftheinternet.org/index.html

Datenkraken bitte nicht füttern!

moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 22.03.2018, 22:48

siggi hat geschrieben:
22.03.2018, 21:06
Hi Moggy
I used the original Diamonds version. The PC runs it at correct speed. So I think the Zeddy cans also do it :mrgreen:
I will check my NMI based timer this weekend using a scope. Maybe it is doing something different to that I meant it should do .. :roll:
Ok Siggi understood, but remember even if this file plays at correct speed you may not hear all the instruments as it is a Roland GS file which the PC will sound but a GM instrument may not.

Please persevere as you are so close to making our little zeddy sing for his supper. :D

Benutzeravatar
siggi
User
Beiträge: 2383
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: Zxpand+ with Midi.

Beitrag von siggi » 24.03.2018, 18:09

Good and bad news.

The scope showed, that the short ticks of the NMI-clock (expected length nx64 us) were much longer (> 180 us) than expected. My NMI based 24 bit timer counts correctly, but its setup was wrong: I thougt, that if one NMI cycle lasts 64 us, then 10 cycles would last 640 us. I did not consider, that the NMI generator is stopped when A' is 0 and that the time necessary to run the NMI code in ROM and my additional NMI code in ram must be also part of the setup value calculation.

This calculation must take care of at least 4 different program flow paths inside the NMI routine, having at least 4 different runtimes. This calculation could be done, but needs additon, subtraction, multiplication, division of 32 bit values. This could be done (even in assembler) before start of the music to set the default timing. But it would last too long to setup new timer values during running the song, caused by a TEMPO meta-event within the MIDI file.

So I decided to make a less complex approximation, which gives not exact timing values, but having a typical deviation of less than 10% and which can also be calculated in realtime during the song.
Now Rhapsody takes 15 min 55 sec (now a little bit too short), Scorpien's Wind of Change runs at same speed, Pink Floyd's Diamond still too slow (has a high BPM of 384, thus runs with shorter NMI ticks).

I added (for debugging) a new counter into the delay routine. It counts up, when the runtime between delay-calls exceeds the length of the desired delay. That means, that the program runs too slow to handle the delays correctly. Fortunately the counter values I have seen (are shown at end of program) are quite low....

Bad news are, that the Z88DK version I use, is a bit buggy when doing 32 bit calulations. So I downloaded the latest version and this errors are gone :mrgreen:
But this Z88DK has new bugs: the program crashes at end, when it should jump back to BASIC. Hopefully this bugs will be resolved soon. Then I will upload a new player version.

Siggi
Mein ZX81-Web-Server: online seit 2007
http://zx81-siggi.endoftheinternet.org/index.html

Datenkraken bitte nicht füttern!

moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 24.03.2018, 20:57

Some good work there Siggi. :D

Is it possible for you to make a recording of diamond just like you did for rhapsody? I cannot play it correctly with the xpand player because of the different tempos so cannot tell what it sounds like. I have managed to contact Charlie and he is going to look into the xpand MIDI player and see why it is ignoring tempo changes.

Keep going Siggi you are nearly there and I feel it is just within your reach. :mrgreen:




Moggy.

Benutzeravatar
siggi
User
Beiträge: 2383
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: Zxpand+ with Midi.

Beitrag von siggi » 24.03.2018, 22:02

Here it is (incl. the .MID file):
diamonds.zip
(1.27 MiB) 38-mal heruntergeladen
Mein ZX81-Web-Server: online seit 2007
http://zx81-siggi.endoftheinternet.org/index.html

Datenkraken bitte nicht füttern!

moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 25.03.2018, 16:11

Thanks for this Siggi.

Firstly congratulations on your achievement. I don't think any Sinclair computer has played a full 16 channel General MIDI file before unconverted :mrgreen: (the feeble excuse for MIDI found on the larger Spectrum computers doesn't count)

The file as far as I'm concerned is playing correctly, the only thing wrong with it is, as I have said before, that it is not a General Midi file and some instruments are wrong and some not sounding at all so that is the only ugly thing about it and would ask you to find a better file if you really want this song.

Even though GM is a standard every manufacturers module/keyboard will sound the song differently depending on what type of tone synthesis they use.
I have songs which on my 30 euro nanosynth sound like a symphonic orchestra, but sound dreadful or ugly on a thousand pounds worth of professional tone module.

The majority of files found on the net especially those created in the 80's/90's were written on Roland equipment and are sympathetic to these modules but sound quite horrible and out of balance on say Yamaha equipment even to the point of fractional timing discrepancies due to each manufacturers interpretation of what its internal MIDI clock should be.

A good rule of thumb is that if it was created on Yamaha for example then it will sound ok on that instrument the same goes for any other type of instrument.
Unlike say machine language in which any given routine is expected to behave a certain way, with MIDI any given run of notes can mean different things to different instruments and in 35 years of using MIDI I have found there is an awful amount of rubbish out there that can make good instruments sound bad and it is those files that are at fault not the instrument or the MIDI player.

Once again congratulations on your achievement. :D


Regards.

Moggy.

Benutzeravatar
siggi
User
Beiträge: 2383
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: Zxpand+ with Midi.

Beitrag von siggi » 25.03.2018, 17:04

Hi Moggy
thanks for your analysis as an Midi expert :mrgreen:
moggy hat geschrieben:
25.03.2018, 16:11
The file as far as I'm concerned is playing correctly, the only thing wrong with it is, as I have said before, that it is not a General Midi file and some instruments are wrong and some not sounding at all so that is the only ugly thing about it and would ask you to find a better file if you really want this song.
I checked again and found, that the song played on a PC and on a Zeddy both take about 11 minutes. So the impression, that it is played slower on a Zeddy seems to be caused by the different sounding, which causes the sounds to to appear at different moments.
The song as is, is ok for me. It is one of my candidates for regression tests (as well as your Rhapsody) for new player versions.
Even though GM is a standard every manufacturers module/keyboard will sound the song differently depending on what type of tone synthesis they use.
I have songs which on my 30 euro nanosynth sound like a symphonic orchestra, but sound dreadful or ugly on a thousand pounds worth of professional tone module.
So the task of the next Zeddy Midiplayer would be, to add missing or convert ugly sound in realtime (as the PC mediaplayer seems to do). The current midi player is approx. 6kByte in size, so there are nearly 10 kB available for further enhancements :mrgreen:

Thanks again for your help
Siggi
Mein ZX81-Web-Server: online seit 2007
http://zx81-siggi.endoftheinternet.org/index.html

Datenkraken bitte nicht füttern!

moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 25.03.2018, 18:30

A MIDI player in 6k!!!!!!!


PC software programmers please take note! :lol:

Benutzeravatar
siggi
User
Beiträge: 2383
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: Zxpand+ with Midi.

Beitrag von siggi » 01.04.2018, 15:16

HI Moggy
I have some MIDI files, that contain a lot of silence at the end (first I thought, that my player is waiting for ever for the meta event "end of track" and could not find it).
Is that a result of a conversion from an other midi (or whatever) format? Or just a bug? Here is one of them:
CowCowBlues.zip
(15.06 KiB) 27-mal heruntergeladen
Siggi
Mein ZX81-Web-Server: online seit 2007
http://zx81-siggi.endoftheinternet.org/index.html

Datenkraken bitte nicht füttern!

moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 01.04.2018, 21:36

siggi hat geschrieben:
01.04.2018, 15:16
HI Moggy
I have some MIDI files, that contain a lot of silence at the end (first I thought, that my player is waiting for ever for the meta event "end of track" and could not find it).
Is that a result of a conversion from an other midi (or whatever) format? Or just a bug? Here is one of them:
CowCowBlues.zip

Siggi
Hi Siggi.

No not the conversion, just another example of an arranger who cannot be bothered to finish his files tidily. :(

Searching through the file I found data relating to a much longer track, tempo changes etc which experience tells me this track was probably part of a medley of tunes which he has saved this part only. ( open sequencer-load file-mark start point-mark end point and save the selection ) the problem with this is that unless you erase the now unwanted meta data out of your new file it will still try to obey the original set up values which in this case meant a run time of about 11 min' as opposed to the 3 min' required for this piece.

When played back in a sequencer the file will generally stop after the last note played which is why he probably thought all was ok with his track but media players etc tend to follow the meta data religiously and in this case will play around 8 min' of silence before halting.

If you examine CSV file, scroll to the end and look at the last note played and below that you will see an end track value and some unwanted tempo values that point to a much longer track. With tracks like this simply delete these tempo values or leave them as you wish and lower the end track value to some point after the last note value, save and reconvert.

I have attached file now redone.
Dateianhänge
cowcowblues.zip
(15.04 KiB) 24-mal heruntergeladen

Benutzeravatar
siggi
User
Beiträge: 2383
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: Zxpand+ with Midi.

Beitrag von siggi » 02.04.2018, 08:42

Hi Moggy
I think, I will enhace the player to handle that by a timeout.
If I would use the events "Note ON" and "Note OFF" to retrigger the timer: would that be sufficient to play valid songs or should I use more MIDI events to reset timeout?

Siggi
Mein ZX81-Web-Server: online seit 2007
http://zx81-siggi.endoftheinternet.org/index.html

Datenkraken bitte nicht füttern!

moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 02.04.2018, 16:16

Hi Siggi.

There are a few ways to look at the problem.

This file was part of a larger file with a section of it saved and as these files do not crop up too often my way would be to leave the player unaltered and alter the end of file data figure to a short point after the last note off value and reconvert.

I suppose you could use note off data but how do you get the player to know the position of the last note?
That is handled by the end of file entry and a simple alteration is all that is required.

A time out is feasible as I have yet to find a song that has, for example, a 5 second pause in the music so having the player reset if it does not encounter MIDI data after 5 seconds could work.

Either way although I'm not a coder I would imagine adding yet more things for the player to do could result in a slow down of the player.

Benutzeravatar
siggi
User
Beiträge: 2383
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: Zxpand+ with Midi.

Beitrag von siggi » 02.04.2018, 17:09

Hi Moggy

the Atmel player counted down the bytes read from file and compared it to the track length given at beginning of the file. I removed that, because counting down a 32 bit value for each byte took too much time. But that would not help in this case ...
In addition to that the meta event "end of track" is detected by the Atmel player and my player. I have read, that this event is "mandatory", so I think, that would be OK to detect the end of each track.

Now I use the "Note ON" and "Note OFF" event to reset an 8 bit counter to 0 (that does not take much time).
And during the delay routine (where the player usually has a lot of time to wait for end of delay) I decrement that couter. If it reaches the value 0 again (after 256 delay calls), that is the timeout condition now to stop the player additionally .

But it did not work using this song which has a lot of "Note_on_" up to the end (in the CVS file). Thus this timeout never occours :shock:
That song is even worse: 2 minutes music and nearly an hour of "sound of silence" (also for the WIN media player)

What is in that file the rule to find the end of the music (if there is any)?
db.zip
(22.02 KiB) 28-mal heruntergeladen
Mein ZX81-Web-Server: online seit 2007
http://zx81-siggi.endoftheinternet.org/index.html

Datenkraken bitte nicht füttern!

moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 02.04.2018, 22:56

Where to start?

I do wish MIDI sites would stop putting crap like this on the net as it gives MIDI a bad name!! :x

This file is one that someone has taken the original and tried to resequence it and without getting into the boring technical stuff it is sufficient to say that he/she has managed to add 46 mins of silence( hanging notes that are actually faded ) on three of the tracks and somehow managed to turn the percussion track into a bloody piano!!

With a lot of sequencers it is difficult to edit out "silence" as when you select the measures to delete some sequencers cannot delete measures without data and the best I could manage with this file was to cut it to 14 mins which is still too long and not wanting to mess around any-more I dug out the original version of this file ( check the CSV at the end and you will see it has the same original arranger, P.Wolmarans.)

I have also included another version by a different arranger.

I would also add that I don't think altering your player will make any difference in the case of bad files like these, better to find properly constructed files in the first instance which can be checked in a good sequencer, Rosegarden for the Pi3 is very good for at least visually checking files I have found.

HTH.

Moggy.
Dateianhänge
db 2.zip
(30.51 KiB) 23-mal heruntergeladen
db 1.zip
(20.4 KiB) 24-mal heruntergeladen

moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 02.04.2018, 23:18

Here are some files by the band Police, whilst not to everyone's musical taste they are in the most part well sequenced (on a Roland sound canvas I think) and sound fairly good.

They are listed by catalogue number rather than song title but the titles should be easy to work out.

Have fun. :D



Moggy.
Dateianhänge
POLICE.zip
(510.52 KiB) 29-mal heruntergeladen

Benutzeravatar
siggi
User
Beiträge: 2383
Registriert: 06.12.2005, 08:34
Wohnort: D, Hessen, tiefste Werreraa
Kontaktdaten:

Re: Zxpand+ with Midi.

Beitrag von siggi » 03.04.2018, 22:44

Hi Moggy
the police files sound really good :-)
Meanwhile I have removed the special "bad midi file" code from my player. I also think, that midi files should be "well done" (like the kind of steaks I prefer :wink: ). Nevertheless my player has problems to play one of the songs (84500_02.MID). It seems to be a very short song: it has the length 0 :wink: . No silence, but also no sound ....

Siggi
Mein ZX81-Web-Server: online seit 2007
http://zx81-siggi.endoftheinternet.org/index.html

Datenkraken bitte nicht füttern!

moggy
User
Beiträge: 81
Registriert: 09.09.2011, 16:30

Re: Zxpand+ with Midi.

Beitrag von moggy » 03.04.2018, 23:32

File 84500_02.MID WHOOPS! :oops: :oops: :oops:

Have some James Taylor by way of apology. :lol:

The zero length file is because of a program I used a long time ago on my Atari STE which would dump the midi files 10 at a time onto a floppy, if it did not have room for the last file it just left the title but no data and when I transferred all of my files to PC I thought had deleted all the zero length stuff but this one seems to have survived, very embarrising.
Dateianhänge
james taylor.zip
(206.62 KiB) 22-mal heruntergeladen

Antworten