Login
Back to forumReply to this topicGo to last reply

Posted By

YERZMYEY
on 2009-09-11
05:02:46
 MUSIC ON TED (for programmists)

Hi there.

Some time ago an Atari coder - XXL - has made several successful 100% conversions from ZX Spectrum Z80 music into Atari XL music played by 6502.

I was wondering if it's possible to make such conversion from ZX Spectrum AY chip into TED.
Of course the AY music would have to be written especcially "for" TED, I mean - in 2 channels and square waves only (plus noise generator of course).

I could make a short AY 2-chnls music for testings.

Hence my questions.

1) Can TED play in one channel square wave and white-noise simultanously (like AY)?
2) Can TED play various kinds of white-noise (from deep to very high noise) or only one kind of the noise?
3) I realize that there is only one volume for both TED's channels. However.
There are actually two kinds of volumes.
a) instruments' volume-envelopes like:
__----___
|_
|_
|_______
|_______
__________________________
(don't know if it's still visible after displaying on the Forum, I hope so)
b) volume of hit (so-called "velocity") when I can change hit's volume of the above
instrument despite it's changing its volume itself (mostly on the end, as You can
see).

Which one of these volumes is obligatory for TED's channels?
- The first one? (Envelope-volumes will change together) - which is more limited
- The second one (only velocity is the same for both channels but they can fade-out
independently) - which would be more comfortable for a musician
??????????


Having such informations, I could try to make some test-song and upload it to some server - maybe some 264 coder might try to play it on TED?

Of course I'm aware it would't work on the first time happy and some further tests would be required however if it worx and if I finally manage to prepare special set of instruments especially for TED - it might be some opportunity of having new pretty comfortable music editor for 264. Spectrum emulators are widely available and most of them has ideal AY emulaton, so it might be interesting.

What do You thing, guyz?

Posted By

YERZMYEY
on 2009-09-11
05:07:33
 Re: MUSIC ON TED (for programmists)

Shit, the a) point is invisible. Forum destroyed my "drawing". wink
THAT'S WHAT SHOULD BE VISIBLE IN THE a) POINT:
http://yerzmyey.republika.pl/envelope-volume.gif

So - anybody?

Posted By

TLC
on 2009-09-11
05:26:14
 Re: MUSIC ON TED (for programmists)

The answer should be divided to two parts -- depending on how you generate the sounds.

1.) You use the TED sounds natively (no artifical sound generation ie. digis)
2.) You write your own sound engine that generates, mixes and plays waveforms.

I guess you were referring to 1.). Keeping that in mind, the answers are

1.) Nope. Noise can be played on channel 2, and exclusively (either square wave, or noise). Channel 1 can't play noise waveform.
2.) "No" and "Yes". The noise waveform is hardwired, but you can change the speed at it is played (similarly to AY but the waveform appears to be shorter thus more "periodic").
3.) There's no volume envelope logic in the TED (at all). The volume setting is a "global volume" that applies to both sound generators at the same time. If you set volume 0, both sound channels mute immediately. If you set volume 8, both would play at the highest volume level (provided that they were turned on first) immediately.

It might be simpler if I summarize what and how you can set in the TED sound registers. This is pretty simple (nowhere near the complexity of the AY).

-- Two 10-bit "frequency" registers (one for each channels) -- better said, it's rather "T" than "f" (you don't describe frequency but period of time, similarly to the AY in principle). The lowest possible frequency that you can generate is about 110Hz.
-- One 4-bit global volume (levels from 0 to 8 are defined, 9 to 15 maps to volume level 8).
-- One on/off bit for each channels. The second channel has a noise on/off bit, too.
-- One "force reload" bit for the whole sound generator (with which one can reset the whole mechanism, and play digis using the volume register).

That's all. No envelopes, no independent volume levels etc.

-----> Edit: you can of course use volume envelopes if they are provided by the music player, but you only have one, global volume to apply settings on. And another thing to add: the volume levels of the TED are linear-ish, as opposed to the AY, where they're exponential.

I am / have been really interested in your results.

Posted By

YERZMYEY
on 2009-09-11
06:22:28
 Re: MUSIC ON TED (for programmists)

TLC:

>1.) You use the TED sounds natively (no artifical sound generation ie. digis)
--------------
Yes, yes, yes, exactly. I wasn't talkin'bout any emulation but simply about an attempt to "provide" some more comfortable music-editor.
For instance - there are some people who makes Spectrum or Gameboy music on Amiga/PC, on proTracker (or Fast) using MOD format. After conversion - they change instrumnets and have ready song.
In our case I would like some 264 coder to convert specially prepared ZX tune into TED, but theoretically it would be more convenient than MOD->ZX because I would try to prepare a set of instruments that would sound very similar on both machines.



>Noise can be played on channel 2, and exclusively (either square wave, or noise).
>Channel 1 can't play noise waveform.
--------------
Ugh. That's tough. So that's like on Atari XL. Well, there still could be prepared some "noise only" snare, hm......



>The noise waveform is hardwired, but you can change the speed at it is played (similarly
>to AY but the waveform appears to be shorter thus more "periodic").
---------
So that would be an issue of further experiments. I see.



>There's no volume envelope logic in the TED (at all). The volume setting is a "global
>volume" that applies to both sound generators at the same time. If you set volume 0,
>both sound channels mute immediately. If you set volume 8, both would play at the
>highest volume level (provided that they were turned on first) immediately.
---------------
Aha. So the musician would have to use VOLUME command only, to stear it, to make envelopes in 'real time', hehe. wink Well, I suspected so, it's not a problem in general, but it is a problem for me as I will not be able to use my favourite ZX editor (it has only envelopes and no VOLUME command at all). In this case I'll think about a Vortex-Tracker. Maybe it would be even easier for 264 guys, because Vortex is an cross-platform ZX editor (works on PC). Hm.
Hm, hm, hm.
It should have VOLUME command.



>The lowest possible frequency that you can generate is about 110Hz.
----------
Ah, that's what I forgot to ask. Octaves. I noticed that TED doesn't have too low basses. That's will be a matter of experiments too, although I will ask one guy about the 110hz too.



Anywayz. Along these advices and information, I will make some test-song. And upload it somewhere.
I hope some 264 coder will find this thread and consider givin a try and converting the file into 264. Of course I'll add an MP3 too (without this, it would be impposible to adjust at all wink ).

************DEAR 264 PROGRAMMISTS************
Think about the idea.
Sadly not everybody can write their musix in directly assembler. happy

Posted By

TLC
on 2009-09-11
06:48:10
 Re: MUSIC ON TED (for programmists)

Yerzmyey:

>>Noise can be played on channel 2, and exclusively (either square wave, or noise).
>>Channel 1 can't play noise waveform.
>--------------
>Ugh. That's tough. So that's like on Atari XL. Well, there still could be prepared some "noise only" snare, hm......

It's pretty similar to SID anyway (noise can't really be combined with any other waveform, the AY is pretty special in this subject -- ie. that it can OR square noise outputs together).

But the TED channel can still be switched from and to noise mode anytime. You can probably make instruments that simply turn the noise bit on for some frames -- they will sound similar-ish on the TED, with the exception that the square tone won't be playing "under the noise" for these few number of frames. It should be a matter of experiments I guess.

Yeah, you shouldn't use "drums" on the first channel that is incapable of playing noise; play drum instruments on channel 2 only.

So that would be an issue of further experiments. I see.

Yeah, possibly.

If you turn your Plus/4 on or download an emulator and enter commands like "vol 8" (set volume level to 8, and "sound 3,freq,time " where "freq" is a integer between 0 and 1023 and time is (AFAIK) time in milliseconds, you can get an overall outlook of the noise waveform of the TED.

>Aha. So the musician would have to use VOLUME command only, to stear it, to make envelopes in 'real time', hehe. Well, I >suspected so, it's not a problem in general, but it is a problem for me as I will not be able to use my favourite ZX editor (it has >only envelopes and no VOLUME command at all). In this case I'll think about a Vortex-Tracker. Maybe it would be even easier for >264 guys, because Vortex is an cross-platform ZX editor (works on PC). Hm.
>Hm, hm, hm.
>It should have VOLUME command.

I don't know which possibilities are the best for you for editing.

I (myself) used to use individual, programmable (software) volume envelopes for instruments in TLCPlay, and used some clever averaging between the actual volume levels of the two channels (we're talking about operations done frame-by-frame here), then kept the volume register updated by the resulting average volume values. ...Clearly not as nice as having individual volume settings, but the end result was bearable. Maybe that's a possibility to play (maybe specially prepared) AY tunes, too.

>110Hz

That's two octaves below the "normal" A note, which is 440Hz. I can't identify how the normal A note is called (which octave it is) in different editors.

>Anywayz. Along these advices and information, I will make some test-song. And upload it somewhere.
>I hope some 264 coder will find this thread and consider givin a try and converting the file into 264. Of course I'll add an MP3 too (without this, it would be impposible to adjust at all ).
>
>************DEAR 264 PROGRAMMISTS************
>Think about the idea.
>Sadly not everybody can write their musix in directly assembler.

I (for one) have been interested about your experiments on TED. I don't promise anything (hate creating vaporware), but I'm still (definitely) interested... that means I might just end up giving that a try in TLCPlay.

Posted By

TLC
on 2009-09-11
07:11:52
 Re: MUSIC ON TED (for programmists)

One final note:

As long as some conditions are kept (>110Hz notes, 2 channel, playing instruments containing noise waveform on the second channel only), and as long as the module format is not that complicated, it shouldn't be too hard "re-touching" the instruments on the target system ie. the Plus/4 or in an assembler code list or whatever. So the restrictions imposed at this point of the story aren't that hard, after all... finalizing the tune on Plus/4 could take more experiments, but the results might also be more promising at the end (given the less restrictions imposed at the primary stage ie. composing).

Posted By

Luca
on 2009-09-11
07:21:38
 Re: MUSIC ON TED (for programmists)

@YERZMYEY (how the hell you've chosen this nick? happy ): I briefly talked about TED sound, and provided some examples too, in Lone News 20, give it a try!

Edit: probably you've just got it, as commented on Pouet.net...

Posted By

YERZMYEY
on 2009-09-11
08:05:08
 Re: MUSIC ON TED (for programmists)

>how the hell you've chosen this nick? happy
--------
You wouldn't believe. wink



>I briefly talked about TED sound, and provided some examples too, in Lone News 20,
>give it a try!
>Edit: probably you've just got it, as commented on Pouet.net...
-------------
Yes, I know the magazine very well however I don't know how to load/start these example-files...?

Posted By

Luca
on 2009-09-11
08:14:26
 Re: MUSIC ON TED (for programmists)

Attach the .D64, DIRECTORY to display thefile list on screen, DLOAD"namefile" (you can use '*' as jolly character) to load a program, RUN to run it.

Posted By

YERZMYEY
on 2009-09-11
08:27:05
 Re: MUSIC ON TED (for programmists)

I must do something wrong because it writes that it couldn't find the file. Hm.

Posted By

Luca
on 2009-09-11
10:17:32
 Re: MUSIC ON TED (for programmists)

Errr...really? :o
Aaah, maybe I've understood: the SPACES!! :)
Commodore machines store the disk file with 16 chars names, look at the real names'length!
Once the .D64 has been attached: let's say you wanna load the file named "lodplay old"; so, DLOAD"LODPLAY OLD " (5 spaces after 'OLD', alternatively: DLOAD"LODPLAY O*", for example); once loaded, RUN it.
Eeeeh, directory style's needings :)

Posted By

YERZMYEY
on 2009-09-15
09:33:10
 Re: MUSIC ON TED (for programmists)

Oh. I didn't know that.
Many thanx, will remember for future.
And of course soon I'll test the progs, btw. wink
Thx again.

Posted By

YERZMYEY
on 2009-09-24
14:03:27
 Re: MUSIC ON TED (for programmists)

OK.

If anybody's interested, then here are two files.

This is a music in ZX format. Made without any volumes (at the moment), with 2 channels only, snare is on channel "2": http://yerzmyey.republika.pl/c16.pt3

To compare is conversion worx OK - here is the MP3 how it is supposed to sound: http://yerzmyey.republika.pl/yerz_c16_test.mp3

Of course it's only a short TEST song, nothing more.

Like I said - AY's sound is virtually the same on a basic level, so my guess is: it's possible to convert.

Let me know if You think it's possible to convert somehow.

Posted By

Chicken
on 2009-09-24
14:22:38
 Re: MUSIC ON TED (for programmists)

I just listened to the mp3 happy Very promising happy

Yes, somebody should give it try. I mean channels and a bit noise on channel 2 should be possible. From my point of view it's more or less getting the data into a ted player. Even if that proves to be more complicated than it sounds wink

Posted By

MMS
on 2009-09-24
17:01:21
 Re: MUSIC ON TED (for programmists)

MP3 very interesting if it could be reached. I would like the outcome.
but what is that pt3 format? I could not find it in the ZX Emu formats.

You may listen to Andras Szigethy's (PIGMY) initial trials to reproduce SID on Plus/4.
We tried the same (2 channels+ the typical snare/drum mixed to the secod channel), but the final result sounded completely different than your MP3.
I think that was the first trial to simulate 3 channels (and other than square wave) on Plus/4.
one example:
http://plus4world.powweb.com/software/Game_Music_4
If you do not touch the original square waves, you will be something similar.
or something like that:
http://plus4world.powweb.com/software/Musics_Demo_4

If you DO touch the original square signal with your own, then you may get:
http://plus4world.powweb.com/software/Hexaeder
(help on initial screen on the crappy music happy press F2 + SPACE, then F2, and change waveform (you know it better than me what is what...) or press F1 for 8 channels.
I think till parallell 4-channels is is rather acceptable (it is well noticeable how the sound volume level decreases compared to noise when number of channels increase...).

Posted By

YERZMYEY
on 2009-09-24
17:43:27
 Re: MUSIC ON TED (for programmists)

Well, actually we try to do something opposite. We try to simulate TED on AY.
Then we will try to convert the AY song into TED. The AY song theoretically is prepared for playing on TED.
If we succeed - then one would be able to make 264 music on comfortable editor on PC and then use it in 264 programs. It would be much better than making music on assembler (impossible for most of musicians, hehe).

Posted By

YERZMYEY
on 2009-09-24
17:54:23
 Re: MUSIC ON TED (for programmists)

Small update - developed files added on the same links:
http://yerzmyey.republika.pl/c16.pt3
http://yerzmyey.republika.pl/yerz_c16_test.mp3
I added to the song some volumes to test. Of course I remembered to change volumes in exactly the same way in both channels, like TED would play.
Now the testing might be more interesting (a poem!??! wink ) for coders.



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon