Omnimaga
Calculator Community => TI Calculators => ASM => Topic started by: Hot_Dog on August 18, 2010, 12:32:28 am
-
For those of you who think you will laugh and point at me for asking a reasonable question, please leave immediately.
So, this is part of the code for PlayWav:
di
ld a, 0FDh
out (01h), a
main:
ld a, (hl)
and 0Fh
ld c, a
call Label15
ld a, (hl)
srl a
srl a
srl a
srl a
and 0Fh
ld c, a
push iy
pop iy ;slow this down a little
call Label15
inc hl
dec de
ld a, d
push iy ;slow this down a little
pop iy
or e
jr nz,main
ei
ret
quit:
pop af
pop af ;fix the stack
pop af
ret
Label15:
ld b, c
inc b
ld a, 0D3h
Label18:
out (00h), a
djnz Label18
ld a, 10h
sub c
ld b, a
ld a, 0D0h
Label19:
out (00h), a
djnz Label19
ret
1. If I were to use a custom sound, one single recorded note, would it be possible to adjust the frequency and duration of that sound to allow more notes?
2. Would it be possible to have 2--or even 4--channels of said single recorded notes at said frequencies and durations?
I'm not asking for code (cause I have an idea of what I want to do), I'm just asking if it's reasonably possible.
-
For those of you who think you will laugh and point at me for asking a reasonable question, please leave immediately.
Don't worry that won't happen here (if someone does, he won't be able to do it more than twice)
-
So are you wanting some sort of WAV playback, or do you want beeps?
-
So are you wanting some sort of WAV playback, or do you want beeps?
WAV. What I'm looking at is a recorded note (such as .1 seconds of violin, like they do with midi), and since the code above can play waves, I'm wondering if that note can be adjusted for length and pitch, and played in two or 4 channels.
-
Your routine is built to play how many bits per sample, and at what sample rate?
-
Your routine is built to play how many bits per sample, and at what sample rate?
Well, it's not actually my routine. But it is 11 Khz, 8-bit mono
-
It's actually 4-bit, I believe.
-
It's actually 4-bit, I believe.
Alright, granted, but that still doesn't answer my questions 8)
EDIT: At least the file sent and converted to a program is 8-bit
-
This also looks like an interesting topic. I'm curious as well. Thanks for asking a great question Hot Dog. ;D
-
This also looks like an interesting topic. I'm curious as well. Thanks for asking a great question Hot Dog. ;D
Well, I'm tossing around the idea with having about 16 "midi" instruments and making music for S.A.D. for 15 Mhz calculators. If I can't get enough channels and can't change single notes, however, it ain't going to happen
-
This also looks like an interesting topic. I'm curious as well. Thanks for asking a great question Hot Dog. ;D
Well, I'm tossing around the idea with having about 16 "midi" instruments and making music for S.A.D. for 15 Mhz calculators. If I can't get enough channels and can't change single notes, however, it ain't going to happen
So you're planning to run this on top of a game? :O I'm not sure how possible this is when using all of the processing time.
-
This also looks like an interesting topic. I'm curious as well. Thanks for asking a great question Hot Dog. ;D
Well, I'm tossing around the idea with having about 16 "midi" instruments and making music for S.A.D. for 15 Mhz calculators. If I can't get enough channels and can't change single notes, however, it ain't going to happen
So you're planning to run this on top of a game? :O I'm not sure how possible this is when using all of the processing time.
Like I said, it's an idea I'm tossing around. But if nobody knows if it's possible for many channels, as well as if it's possible to have a single recorded note and change pitch and duration...
/me runs off to experiment
EDIT: I'll keep up on this post as to what I find out, for those of you curious
-
I believe that with WAV sound, the pitch/speed are linked. This is why typically when speeding up the sound goes higher and slowing down it goes lower. Apparently changing the speed without changing the pitch or vice versa is a problem even on PCs.
-
Well if it can be sped up or down, that's not an issue. I don't care about the speed since most notes will repeat (in order to be held out) anyways. After all, on computer midi, if you start with a single recorded note (like a piano note), the sound will run faster and faster the higher up you go.
-
Looks like I should leave the improbable to calc84maniac. Using a short note to make a long note (such as a string orchestra) is almost impossible without hearing some clicks and pops, and if I have all short notes and no long background notes, it's not worth using recorded sounds instead of having all beeps (especially since beeps have no issues with long notes).
However, I'm still thinking about music for 15 Mhz S.A.D. if I can think of some decent beep-beep music. It's likely I'll do some 4 channel stuff
-
You can synthesize your own instruments you know without having to record anything. Its basically just like a regular solid square wave, but you have a list of pitch shifts like +1,0,-1,-2,-1,0,+1 or something and you can create some really cool effects at very high quality. I've never tried this, but its definitely possible.
-
You can synthesize your own instruments you know without having to record anything. Its basically just like a regular solid square wave, but you have a list of pitch shifts like +1,0,-1,-2,-1,0,+1 or something and you can create some really cool effects at very high quality. I've never tried this, but its definitely possible.
Interesting, I'll have to look up how to do that. (+1 respect, because I didn't think about that) Since the game should run somewhat well (if not very well) at 6 MHz, I don't think speed is going to be an issue.
-
Calc84maniac, how did you make your "New Project M" noise generator? Perhaps some code?