• lysergik

    Hi, I wasn't so sure where I should post so I post here even though it's not really a technical issue.

    I want to had swing to my sequencer, so far it a 8 bar sequencer functioning with a separate clock, with it's own pattern storage thing ect... I know what swing is but I'm not sure how I should implement it.

    I've read a bit from old forum post where little is said and without example and here's how I think adding it to my sequencer: defining a random value in miliseconds at each step that would be added to the time of the clock, this value should be redifine at each step and this value should be define into an interval that could be changed by the user. Is this a good way to code a "swing" ?

    I never used randominsation inside a pure data patch so it something I would have to learn(I guess it's not that hard to understand). Where I'm more confused is the interval of milisecond I should use to implement the "swing", so if anyone could give some advise in that regard it would be great.

    posted in technical issues read more
  • lysergik

    @whale-av Thanks ! Since I found drum synth I found online I didn't knew about those send and receive inside the propereties menu of the number box. I just had to delete the send and receive and it work. Also I didn't had to rename"osc_pair_1" and the other used for pitch because they are subpatches, and they were relied to the sliders via the same send and receive function that we find elsewere. Thanks again.

    posted in technical issues read more
  • lysergik

    I didn't used array or specific value in those subpatches. Here's the code : drummachine.pd

    posted in technical issues read more
  • lysergik

    No they are named "pd tom" and "pd hihat" so it should be fine

    posted in technical issues read more
  • lysergik

    Hi,
    I started a simple project just for fun and I encountered something strange. I use some subpatch on my patch on they work well, though they doing somehting strange. I have made some copies of a few subpatch I've made and when I tweak a value of one subpatch it affect the sound of it's copy, which is strange. It affect all the subpatch I made copy of. And I've tried to made subpatch with the same code but different names and it does the exact same thing. I'm very confused, I don't understand what is going on.

    posted in technical issues read more
  • lysergik

    Hi guys, so I manage to get rid of the "output snd_pcm_delay failed" error by running pd with Jack. It doesn't do anything for the CPU, still got my four cores running at 50%. I did some profiling on groovebox 2 and my first my frist version of the "fork" I was working on and I notcied that I didn't get any vfprintf calls, so the problem doesn't come from neither martin Birkmann patch or my first tweaks on it, but only from the implementation of pd~. Since the vfprintf isn't due to the alsa error message, it must be something else. It's not the synth of the patch or the mixer and fx that works well somewhere else. Then the only thing that are remains in this audio processing patch is the following : an object that permits me to get all the value that come from my GUI patch via netsend/netreceive and another object which take the value received via netsend to then them with a message to the pd~ object.

    My netsend/netreceive object seems to have worked fine until now I didn't notice any CPU issues when using it. The other object maybe the source of the problem, thoough it's strange because the value that I send from the GUI are sent properly to the audio processing patch. So I'don't know what to do. Should I pack an archive of my code and put it here so you could have a better idea of whats going on ?

    posted in technical issues read more
  • lysergik

    Hi @whale-av thanks to give your outlook on this. My performance on groovebox 2 is similar to yours, a bit more CPU use but my CPU is a bit slower so nothing strange. My "fork" of this patch runs with similar specs. Then the error message I got is happening both to my rpi and laptop, so it would explain why I got messed up performances with pd~. I'll try to see if upgradung to new kernel in both OS helps or to find other way to get rid of this. If this solve my issue with pd~ it would be nice, I'll give you guys an update as soon as I have looked into that.

    posted in technical issues read more
  • lysergik

    Well I do not see what is the main difference with the result I've shown before, maybe now we know that vfprintf function call is linked to printf_chk, that I didn't seen before while profiling. Also we got a malloc call and some dac call, so if you got any clue of what it could meant it would be great. Then I have to agree profiling isn't easy(it's my first time doing it ^^) but trying to fix the problem as such low level coudl be the best way to find a real fix to this bottleneck.

    @mnb Hello ! First I thank you to have uploaded your patches, they're great ! Then to answer you, no I'm using the groovebox 2, the one you recommend. So the problem isn't from the filter object. But since you coded this patch you maybe could run it on your config and report here how much CPU power it takes on your side. By doing this we could identify if the problem is coming from the code or my hardware(I remember reading somewhere that embed intel GPU could have crappy result with pd, so with a bit of luck i could find somekind of driver fix to this issue).

    @EEight Well, when I'll get something running fine on my laptop I'll port it to the RPI and of course I'll use -nogui, even switch~ if it's possible. But on the two version of my ptach I got either 50% of my first core(whith a 2Ghz CPU) or on the v2 of the patch 4 cores running at peak over 50%. Considering that my Pi is using a Broadcom BCM2837, with 1,2 Ghz on four cores and that the frequency is lock by the system around 900 MGhz if I'm right, it's just impossible to run my patch now on the rpi. I thinked that in theory splitting the audio processing to spread the calculation over the processor I would get 1ghz of calculation devided in four and then I could reach 250-300 MHz on each cores, that could run very smoothly on a rpi. But because there is something bugging somewehre I've just multiply the audio processing ressources by FOUR ! And -no-gui(that I already use on my laptop) or other tip for optimization such as latency doesn't help the CPU on my laptop, so I don't even think of its efficency on a RPI. I also noticed that when I increased the latency of my pure data instances, CPU use goes up ! So it's not something I could use for optimization. And didn't find ways to run pd on alsa on my Pi the only way I could get it to run without crahsing when dsp is on is with jack.

    posted in technical issues read more
  • lysergik

    First subpatch:

    report ->
    
    -   41,17%     9,23%  pd       [unknown]           [.] 0000000000000000                                                                                                
       - 37,73% 0                                                                                                                                                          
          - 17,87% __printf_chk                                                                                                                                            
             + 14,75% vfprintf                                                                                                                                             
               0,96% __printf_fp                                                                                                                                           
          - 5,36% 0                                                                                                                                                        
             - 0xda0580                                                                                                                                                    
             - 0                                                                                                                                                           
                  0,73% garray_getarray                                                                                                                                    
                  0,67% pd_findbyclass                                                                                                                                     
            3,81% __GI_____strtod_l_internal                                                                                                                               
            2,21% strlen                                                                                                                                                   
            1,77% binbuf_text                                                                                                                                              
            0,82% pd_extern_sched                                                                                                                                          
            0,82% atom_getfloat@plt                                                                                                                                        
            0,61% 0xba25daeb2f749a00                                                                                                                                       
            0,53% atom_getfloat                                                                                                                                            
       - 1,89% 0x300a300a300a300a                                                                                                                                          
            0                                                                                                                                                              
       - 0,73% 0x1bfca50                                                                                                                                                   
            0                                                                                                                                                              
            __printf_chk                                                                                                                                                   
    -   18,60%     0,00%  pd       [unknown]           [.] 0x0000000001bfca50                                                                                              
         0x1bfca50                                                                                                                                                         
         0                                                                                                                                                                 
       - __printf_chk                                                                                                                                                      
          - 15,19% vfprintf                                                                                                                                                
               8,65% __GI___printf_fp_l                                                                                                                                    
               0,63% __mpn_mul_1                                                                                                                                           
            0,96% __printf_fp                   
    -   15,19%     4,18%  pd       libc-2.23.so        [.] vfprintf                                                                                                        
       - 11,01% vfprintf                                                                                                                                                   
            8,65% __GI___printf_fp_l                                                                                                                                       
            0,63% __mpn_mul_1                                                                                                                                              
       - 4,18% 0x1bfca50                                                                                                                                                   
            0                                                                                                                                                              
            __printf_chk                                                                                                                                                   
            vfprintf                                                                                                                                                       
    -   11,33%     0,00%  pd       [unknown]           [.] 0x300a300a300a300a                                                                                              
       - 0x300a300a300a300a                                                                                                                                                ◆
            6,71% _IO_getc                                                                                                                                                 
            1,89% 0                                                                                                                                                        
            1,44% pd_extern_sched                                                                                                                                          
          - 0,54% __GI___libc_read                                                                                                                                         
               entry_SYSCALL_64_fastpath                                                                                                                                   
               sys_read                                                                                                                                                    
               vfs_read                                                                                                                                                    
               __vfs_read                                                                                                                                                  
               new_sync_read                                                                                                                                               
    -   10,54%    10,54%  pd       libc-2.23.so        [.] malloc_consolidate                                                                                              
         0xf1                                                                                                                                                              
         malloc_consolidate                                                                                                                                                
    -   10,54%     0,00%  pd       [unknown]           [.] 0x00000000000000f1                                                                                              
         0xf1                                                                                                                                                              
         malloc_consolidate                                                                                                                                                
    -    8,65%     8,65%  pd       libc-2.23.so        [.] __GI___printf_fp_l                                                                                              
         0x1bfca50                                                                                                                                                         
         0                                                                                                                                                                 
         __printf_chk                                                                                                                                                      
         vfprintf                                                                                                                                                          
         __GI___printf_fp_l                                                                                                                                                
    -    6,71%     6,71%  pd       libc-2.23.so        [.] _IO_getc                                                                                                        
         0x300a300a300a300a                                                                                                                                                
         _IO_getc                                                                                                                                                          
    -    5,24%     5,23%  pd       pd                  [.] plus_perf8                                                                                                      
         plus_perf8                                             
    
    report no children ->
    
    -   41,17%     9,23%  pd       [.] 0000000000000000                                                                                                                    
       - 37,73% 0                                                                                                                                                          
          - 17,87% __printf_chk                                                                                                                                            
             - 14,75% vfprintf                                                                                                                                             
                  8,65% __GI___printf_fp_l                                                                                                                                 
                  0,63% __mpn_mul_1                                                                                                                                        
               0,96% __printf_fp                                                                                                                                           
          - 5,36% 0                                                                                                                                                        
             - 0xda0580                                                                                                                                                    
             + 0                                                                                                                                                           
            3,81% __GI_____strtod_l_internal                                                                                                                               
            2,21% strlen                                                                                                                                                   
            1,77% binbuf_text                                                                                                                                              
            0,82% pd_extern_sched                                                                                                                                          
            0,82% atom_getfloat@plt                                                                                                                                        
            0,61% 0xba25daeb2f749a00                                                                                                                                       
            0,53% atom_getfloat                                                                                                                                            
       - 1,89% 0x300a300a300a300a                                                                                                                                          
            0                                                                                                                                                              
       - 0,73% 0x1bfca50                                                                                                                                                   
            0                                                                                                                                                              
            __printf_chk                                                                                                                                                   
    -   11,33%     0,00%  pd       [.] 0x300a300a300a300a                                                                                                                  
       - 0x300a300a300a300a                                                                                                                                                
            6,71% _IO_getc                                                                                                                                                 
            1,89% 0                                                                                                                                                        
            1,44% pd_extern_sched                                                                                                                                          
          - 0,54% __GI___libc_read                                                                                                                                         
               entry_SYSCALL_64_fastpath                                                                                                                                   
               sys_read                                                                                                                                                    
               vfs_read                                                                                                                                                    
               __vfs_read                                                                                                                                                  ◆
               new_sync_read  
    -   10,54%  pd       libc-2.23.so        [.] malloc_consolidate                                                                                                        
         malloc_consolidate                                                                                                                                                
         0xf1                                                                                                                                                              
    -    9,23%  pd       [unknown]           [.] 0000000000000000                                                                                                          
       - 0                                                                                                                                                                 
            3,70% 0                                                                                                                                                        
            1,89% 0x300a300a300a300a                                                                                                                                       ◆
    -    8,65%  pd       libc-2.23.so        [.] __GI___printf_fp_l                                                                                                        
         __GI___printf_fp_l                                                                                                                                                
         vfprintf                                                                                                                                                          
         __printf_chk                                                                                                                                                      
         0                                                                                                                                                                 
         0x1bfca50                                                                                                                                                         
    -    6,71%  pd       libc-2.23.so        [.] _IO_getc                                                                                                                  
         _IO_getc                                                                                                                                                          
         0x300a300a300a300a                                                                                                                                                
    -    5,23%  pd       pd                  [.] plus_perf8                                                                                                                
         plus_perf8                                                                                                                                                        
    -    4,18%  pd       libc-2.23.so        [.] vfprintf                                                                                                                  
         vfprintf                                                                                                                                                          
         __printf_chk                                                                                                                                                      
         0                                                                                                                                                                 
         0x1bfca50                               
    

    Second subpatch:

    report ->
    
    -   10,54%  pd       libc-2.23.so        [.] malloc_consolidate                                                                                                        
         malloc_consolidate                                                                                                                                                
         0xf1                                                                                                                                                              
    -    9,23%  pd       [unknown]           [.] 0000000000000000                                                                                                          
       - 0                                                                                                                                                                 
            3,70% 0                                                                                                                                                        
            1,89% 0x300a300a300a300a                                                                                                                                       
    -    8,65%  pd       libc-2.23.so        [.] __GI___printf_fp_l                                                                                                        
         __GI___printf_fp_l                                                                                                                                                
         vfprintf                                                                                                                                                          
         __printf_chk                                                                                                                                                      
         0                                                                                                                                                                 
         0x1bfca50                                                                                                                                                         
    -    6,71%  pd       libc-2.23.so        [.] _IO_getc                                                                                                                  
         _IO_getc                                                                                                                                                          
         0x300a300a300a300a                                                                                                                                                
    -    5,23%  pd       pd                  [.] plus_perf8                                                                                                                
         plus_perf8                                                                                                                                                        
    -    4,18%  pd       libc-2.23.so        [.] vfprintf                                                                                                                  
         vfprintf                                                                                                                                                          
         __printf_chk                                                                                                                                                      
         0                                                                                                                                                                 
         0x1bfca50                               
    
    -    9,92%  pd       [unknown]           [.] 0000000000000000                                                                                                          
       - 0                                                                                                                                                                 ◆
          - 0,73% vfprintf                                                                                                                                                 
               __printf_chk                                                                                                                                                
               0                                                                                                                                                           
               0x1257040                                                                                                                                                   
    -    9,69%  pd       libc-2.23.so        [.] __GI___printf_fp_l                                                                                                        
         __GI___printf_fp_l                                                                                                                                                
         vfprintf                                                                                                                                                          
         __printf_chk                                                                                                                                                      
         0                                                                                                                                                                 
         0x1257040                                                                                                                                                         
    -    7,65%  pd       libc-2.23.so        [.] vfprintf                                                                                                                  
       - vfprintf                                                                                                                                                          
          - 7,55% __printf_chk                                                                                                                                             
               0                                                                                                                                                           
               0x1257040                                                                                                                                                   
    -    5,29%  pd       pd                  [.] 0x000000000008748c                                                                                                        
         0x8748c                                                     
    

    posted in technical issues read more
  • lysergik

    Hello everyone ! @Nicolas Danet First I've succesfully compiled pd with the flag, then I profiled my 3 patch/subpatches using the command you showed. So here what I got from this profiling (the report dsos=pd command doesn't gave me intersting result, so it's output is not showed here.)

    Mother patch:

    report ->
    
    -   33,34%     8,01%  pd       libc-2.23.so        [.] vfprintf                                                                                                        
       - 25,33% vfprintf                                                                                                                                                   
            16,57% __GI___printf_fp_l                                                                                                                                      
            2,95% hack_digit                                                                                                                                               
          - 2,45% __GI___ioctl                                                                                                                                             
               entry_SYSCALL_64_fastpath                                                                                                                                   
               sys_ioctl                                                                                                                                                   
             + do_vfs_ioctl                                                                                                                                                
            1,29% __mpn_mul_1                                                                                                                                              
            0,70% strlen                                                                                                                                                   
       + 8,01% __fprintf_chk                                                                                                                                               
    -   16,57%    16,18%  pd       libc-2.23.so        [.] __GI___printf_fp_l                                                                                              
         16,18% __fprintf_chk                                                                                                                                              
            vfprintf                                                                                                                                                       
            __GI___printf_fp_l                                                                                                                                             
    -   13,69%    13,69%  pd       libc-2.23.so        [.] __GI_____strtof_l_internal                                                                                      
       - 12,53% 0x2f73250064702f6e                                                                                                                                         
            __isoc99_vsscanf                                                                                                                                               
            __GI_____strtof_l_internal                                                                                                                                     
       - 1,16% 0x7ffc9a2c60                                                                                                                                                
            __GI_____strtof_l_internal                                                                                                                                     
    -   12,71%    12,51%  pd       libc-2.23.so        [.] _IO_vfscanf                                                                                                     
         12,51% 0x2f73250064702f6e                                                                                                                                         
            __isoc99_vsscanf                                                                                                                                               
            _IO_vfscanf               
    -    5,49%     5,49%  pd       [kernel.kallsyms]   [k] delay_tsc                                                                                                       ◆
       - 1,94% 0x3a7e647000732520                                                                                                                                          
            vfprintf                                                                                                                                                       
            __GI___ioctl                                                                                                                                                   
            entry_SYSCALL_64_fastpath                                                                                                                                      
            sys_ioctl                                                                                                                                                      
            do_vfs_ioctl                                                                                                                                                   
            snd_pcm_capture_ioctl                                                                                                                                          
          + snd_pcm_capture_ioctl1                                                                                                                                         
       - 1,49% __GI___ioctl                                                                                                                                                
            entry_SYSCALL_64_fastpath                                                                                                                                      
            sys_ioctl                                                                                                                                                      
            do_vfs_ioctl                                                                                                                                                   
            snd_pcm_capture_ioctl                                                                                                                                          
          + snd_pcm_capture_ioctl1                                                                                                                                         
       - 1,34% 0x64c99                                                                                                                                                     
            __GI___ioctl                                                                                                                                                   
            entry_SYSCALL_64_fastpath                                                                                                                                      
            sys_ioctl                                                                                                                                                      
            do_vfs_ioctl                                                                                                                                                   
            snd_pcm_capture_ioctl                                                                                                                                          
          - snd_pcm_capture_ioctl1                                                                                                                                         
             - 0,80% snd_pcm_common_ioctl1                                                                                                                                 
                  snd_pcm_status_user                                                                                                                                      
                  snd_pcm_status                                                                                                                                           
                  snd_pcm_update_hw_ptr                                                                                                                                    
                  snd_pcm_update_hw_ptr0                                                                                                                                   
                  azx_pcm_pointer                                                                                                                                          
                  azx_get_position                                                                                                                                         
                  azx_get_pos_skl                                                                                                                                          
                  __const_udelay                                                                                                                                           
                  delay_tsc                                                                                                                                                
             + 0,54% __snd_pcm_lib_xfer 
    
    report no children ->
                            
    -   16,18%  pd       libc-2.23.so        [.] __GI___printf_fp_l                                                                                                        
         __GI___printf_fp_l                                                                                                                                                
         vfprintf                                                                                                                                                          
         __fprintf_chk                                                                                                                                                     
    -   13,69%  pd       libc-2.23.so        [.] __GI_____strtof_l_internal                                                                                                
       - __GI_____strtof_l_internal                                                                                                                                        
          - 12,53% __isoc99_vsscanf                                                                                                                                        
               0x2f73250064702f6e                                                                                                                                          
            1,16% 0x7ffc9a2c60                                                                                                                                             
    -   12,51%  pd       libc-2.23.so        [.] _IO_vfscanf                                                                                                               
         _IO_vfscanf                                                                                                                                                       
         __isoc99_vsscanf                                                                                                                                                  
         0x2f73250064702f6e                                                                                                                                                
    -    8,01%  pd       libc-2.23.so        [.] vfprintf                                                                                                                  ◆
         vfprintf                                                                                                                                                          
         __fprintf_chk                                                                                                                                                     
    -    5,49%  pd       [kernel.kallsyms]   [k] delay_tsc                                                                                                                 
         delay_tsc                                                                                                                                                         
         __const_udelay                                                                                                                                                   
         azx_get_pos_skl                                                                                                                                                   
         azx_get_position                                                                                                                                                  
         azx_pcm_pointer                                                                                                                                                   
       - snd_pcm_update_hw_ptr0                                                                                                                                            
          - 2,88% snd_pcm_update_hw_ptr                                                                                                                                    
             - 2,69% snd_pcm_status                                                                                                                                        
                  snd_pcm_status_user                                                                                                                                      
                  snd_pcm_common_ioctl1                                                                                                                                    
                  snd_pcm_capture_ioctl1                                                                                                                                   
                  snd_pcm_capture_ioctl                                                                                                                                    
                  do_vfs_ioctl                                                                                                                                             
                  sys_ioctl                                                                                                                                                
                  entry_SYSCALL_64_fastpath                                                                                                                                
                + __GI___ioctl                                                                                                                                             
          + 2,60% __snd_pcm_lib_xfer 
    

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!