Shop OBEX P1 Docs P2 Docs Learn Events
Sample stream mixer — Parallax Forums

Sample stream mixer

cruXiblecruXible Posts: 78
edited 2015-04-29 03:57 in Propeller 1
Hello.

I tried to go as far as I could in a reasonable amount of time, and now I am submitting myself to you for judgement.

I am trying to write my own simple mixer, but got stuck when trying to use the sample stream from Chip's vocaltract.

I looked through stereospatializer and copied bits for the timing, but it is still not going right.

I think it isn't synced and is reading from the hub as the hub is being written to. There is bad digital noise, even when it is supposed to be silent.

If that is the case, how do I sync the mixer and vocaltract?
VAR                                                                                                                                           
                                                               
  long  samples, cnt_                 

PUB start (addy)

  samples := addy
  
  cnt_ := clkfreq / 20_000

  cognew(@mixer, @samples)

DAT

org     0

mixer   mov             temp1, par
        rdlong          temp1, temp1

        mov             temp2, #6
        shl             temp2, #26
        add             temp2, #15
        mov             ctra, temp2
        mov             dira, #1
        shl             dira, #15

        mov             t1, par
        add             t1, #4
        rdlong          cnt_ticks,t1            'get cnt ticks
        

        mov             cnt_value,cnt           'prepare for initial waitcnt
        add             cnt_value,cnt_ticks


:loop   waitcnt         cnt_value,cnt_ticks
        rdlong          frqa, temp1
        jmp             #:loop




temp1 res
temp2 res
t1    res
cnt_ticks     res
cnt_value     res
              

Thanks for any help you can provide.

Comments

  • cruXiblecruXible Posts: 78
    edited 2015-04-29 00:26
    Stop reading Stefan's post. It should have been deleted already anyways. It is detracting from my views. :)
  • kuronekokuroneko Posts: 3,623
    edited 2015-04-29 03:57
    I assume that you monitor the sample location of the VocalTract object. Note that the value fed to its DUTY counter is not what is stored at that location.
    mov     t1,x                    'update duty cycle output for pin driving
                            [color="red"]add     t1,h80000000
                            mov     frqb,t1[/color]
    
                            mov     t1,par                  'update sample receiver in main memory
                            add     t1,#1*4
                            [color="blue"]wrlong  x,t1[/color]
    
Sign In or Register to comment.