English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 09 September 2018, 11:12   #1
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
Pro tracker 3 replay routine

I'm using pt3.0b_replay_cia , I wonder if is there any way to get current channel volume.

Currently I'm using pt_audchanXtemp just to see if sample note is touched, but I don't know if I can obtain more info on that.
fstarred is offline  
Old 09 September 2018, 12:13   #2
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by fstarred View Post
I'm using pt3.0b_replay_cia , I wonder if is there any way to get current channel volume.

Currently I'm using pt_audchanXtemp just to see if sample note is touched, but I don't know if I can obtain more info on that.

Untested but should work:
Code:
    moveq   #channel,d0     ;0 to 3
    lea pt_audchan1temp,a0
    mulu.w  #44,d0
    move.b  19(a0,d0.l),d0
EDIT: you can use the resulting d0 also as a word or long, because of the first moveq and the index that after the mul do not span above byte value

Last edited by ross; 09 September 2018 at 12:38.
ross is offline  
Old 11 September 2018, 14:10   #3
fstarred
Registered User
 
fstarred's Avatar
 
Join Date: Mar 2018
Location: Rome
Posts: 173
Hi ross, sorry for the delay, anyway thanks for the code, it works ! (How did you know the code? Don't tell me you just guess from the source )

Btw, the 19 pt_audxchanTemp take the volume value, so you still have to deal with the natural volume decrease, in which you have to take a solution by yourself.

Thank you
fstarred is offline  
Old 11 September 2018, 14:45   #4
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by fstarred View Post
(How did you know the code? Don't tell me you just guess from the source )

There is no guesswork needed, you just have to look where/how n_volume is accessed in the source, the rest is trivial.
StingRay is offline  
Old 11 September 2018, 17:32   #5
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
As said by StingRay
ross is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:08.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.21130 seconds with 12 queries