SuperPlayer - The DSP_Engine (CamillaDSP) samplerate switching & ESP32 remote control

Depending on what 3.3 V regulator chip they use on the ESP-board you use, there is a chance that the voltage regulator itself sucks most of the juice from your battery.

You need a regulator with a very low idle current consumption. The one on the WEMOSs ESP32, draws 40 µA. There are better ones, and maybe you have a good one on your ESP-board.




/ πr
 
Hey... Try to look at post #163.


It's because $samplerate$ is the part of the filename.

Example ::
The /home/tc/camilladsp/filters/$samplerate$l_prefir.bin will be like this in your'e path.
/home/tc/camilladsp/filters/44100l_prefir.bin, because $samplerate$ is set by the plugin (in this example 44100).

Btw: I see no attachment's in your'e post?


Jesper.


Hi Jesper,


My apologies for my mistake. This time you should have the attachments.


I saw the post 163, but as mentioned I do not have any *.bin file.


Cheers,
Francesco
 

Attachments

  • A_OUTPUT ls -all hometccamilladsp.txt
    596 bytes · Views: 39
  • B_OUTPUT cat hometccamilladsptemplateconfig_template.yml.txt
    1.5 KB · Views: 46
  • C_OUTPUT cat etcasound.conf.txt
    673 bytes · Views: 41
  • D_OUTPUT ps aux grep squeezelite.txt
    202 bytes · Views: 39
  • Filter.txt
    1.3 KB · Views: 36
Ahhh... I see now :)

The config files look right!

You could do the EQ directly in Camilladsp config file i think, BUT ::

If you do what i do, THEN :
You need to create a .bin filter after you do the EQ in REW.

The .bin filter can be created in e.g the RePhase program. rePhase - Official Site - Free FIR filtering tool

This is not so easy to help with, if i do not have the measurements and perhaps youre prefered "house" curve.

Jesper.
 
Hi Jesper,


now we are on the same page, finally I was able to make clear my issue :).


I have followed the tutorial in the video:


Correct your speakers with REW, UMIK-1 and Equalizer APO (Room Correction Tutorial) - YouTube


Attached you can find the average of the measurements and the final result with the filter applied.



What advantage is giving the rePhase procedure vs EQ in REW?


Do you know some tutorial which explain how to do steps by steps? Something for a "dummy" like me ;)! I have found the guide attached (pdf), but it is not so clear to me.


Thank you so much!!!!


Francesco
 

Attachments

  • 20201008_Test1.zip
    3.8 MB · Views: 44
  • Bear_REW_rePhase_tuto1.pdf
    1,020.7 KB · Views: 105
Hi Jesper,


I prefer to learn but there is always time and furthermore I cannot absolutely refuse your kind help :up:.


I am leaving for work, in one month, when I will come back at home I will do the measurements properly, in fact so far I am in the learning mode and I did no accurate measurements (I have neither separate L and R).


Thank you so much and all the best.


Speak you soon,
Francesco
 
Hey all...

I'am developing a remote controller for the "SuperPlayer" or whatever used.

This is just a teaser, but i am testing it right now in "real life" for fun :p

Thing's which are working ::

Batterypowered ESP32 (this is a very good gadget!) Adafruit HUZZAH32 – ESP32 Feather Board ID: 3405 - $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits

BLE (Bluetooth low energy) is sending volume up/down (either lms volume or camilladsp volume), play/pause with single click on encoder & double click toggles mute/unmute.

It seems to be working very stable, with battery... I don't know how well this works for long time testing yet. - The ESP goes into "deep sleep" mode after 1hour of operation. - Still lot's of things to work with :) ... But sure it's fun to do!

Jesper.

Jesper.
 

Attachments

  • IMG_7742.jpg
    IMG_7742.jpg
    730.9 KB · Views: 117
  • IMG_7744.jpg
    IMG_7744.jpg
    534.7 KB · Views: 117
TNT!

Will it work also on Mac?

If you run camilladsp on the mac, if you can install bluepy and other python stuff along with the BLE stuff, i would work.

Is it hard to connect a 2 digit display to output the current attenuation?

I would say... sure it's possible Segment Display Tutorial for Arduino, ESP8266 and ESP32 - DIYI0T

It's just fun and a lot of work.

Could you try installing the BLE and python stuff on the MAC?

My python script look's like this now ::

Code:
#!/usr/local/bin/python3

#################################################
#                                               #
# SuperPlayer Bluetooth (BLE) remote controller #
#                                               #
# Build with help from different sources (www)  #
#                                               #
# Jesper Lykke [user :: Lykkedk @ diyaudio.com] #
#                                               #
#################################################

from camilladsp import CamillaConnection
import io
import os
import stat
import subprocess
import sys
from subprocess import call
import time
from bluepy.btle import UUID, Peripheral

cdsp = CamillaConnection("127.0.0.1", 1234)

GO = int(1)            # Go through loop = (1)
MUTE = int(0)          # Mute = (1) / Unmute = (0)

# '--gain <gain>': Must be a number between -120 and +20

volume = int(-12)      # We start with volume at -12dB
MIN_volume = int(-110) # Lower limit with some proof
MAX_volume = int(-3)   # Upper limit with some proof
CN = int(-3)           # Set volume default for Unmute / Mute

value = (0x002a)                               # BLE Characteristic
#p = Peripheral("B8:F0:09:CD:30:F2", "public") # The MAC adress of the ESP32
#               FC:F5:C4:06:BB:C6
p = Peripheral("FC:F5:C4:06:BB:C6", "public")  # The MAC adress of the ESP32 Feather
OLD_value = p.readCharacteristic(value)        # 1. read value
LONG_press = b'\xa8a\x00\x00'                  # = 25000 from Arduino/ESP32 Serial monitor
DOUBLE_press = b'P\xc3\x00\x00'                # = 50000 from Arduino/ESP32 Serial monitor

while 1:

    if (GO == 1):
        raw = p.readCharacteristic(value)

        if (MUTE == 0):
            if (raw < OLD_value):
                #call(["/usr/local/bin/pcp", "down"])
                volume = (volume -1.5)
                cdsp.connect()
                CN=cdsp.get_volume()
                if (CN <= MIN_volume):
                    volume = int(MIN_volume)
                    cdsp.connect()
                    cdsp.set_volume(volume)
                    CN=cdsp.get_volume()

                cdsp.connect()
                cdsp.set_volume(volume)
                CN=cdsp.get_volume()
                print ("Volume DOWN :", CN)
                OLD_value = raw

        if (MUTE == 0):
            if (raw > OLD_value):
                #call(["/usr/local/bin/pcp", "up"])
                volume = (volume +1.5)
                cdsp.connect()
                CN=cdsp.get_volume()
                if (CN >= MAX_volume):
                    volume = int(MAX_volume)
                    cdsp.connect()
                    cdsp.set_volume(volume)
                    CN=cdsp.get_volume()

                cdsp.connect()
                cdsp.set_volume(volume)
                CN=cdsp.get_volume()
                print ("Volume UP   :", CN)
                OLD_value = raw

        if (raw == LONG_press):
            call(["/usr/local/bin/pcp", "pause"])
            print ("Pause / Play")
            raw = OLD_value
            time.sleep(1.00)

        if (raw == DOUBLE_press):
            print ("Double press")
            MUTE = (MUTE + 1) % 2
            if (MUTE == 0):
                print ("<> Unmute system <>")
                cdsp.connect()
                cdsp.set_volume(CN)
                time.sleep(1.00)
            if (MUTE == 1):
                print ("<> Mute system <>")
                cdsp.connect()
                CN=cdsp.get_volume()
                cdsp.set_volume(MIN_volume)
                time.sleep(1.00)

time.sleep(0.05)

Jesper.
 
Cool :)

Is it not possible that you compile it yourself on the mac? or is this to complicated?
Did you buy any of them ESP32 yet?

Merry xmas also! :deer:

Let's see how it goes TNT...

Right now i'am testing it in reallife test.
I'am unsure if the battery operation will last for very long, eventhrough i let the ESP fall deep asleep when not in use; an option is to make a dedicated switch on the remote, but it's not my original idea!

As it is now, the following thing's are working ::

A) Pretty fast - actually very good responce when turning volume up/down, pause/play and mute.

B) ESP goes to deep sleep after 60min when not used - Working good enough.

C) When pressing a "long" press, remote is sending play/pause + the voltage of the battery. - Also work's as expected

D) Every time the ESP32 is awakened after sleep a counter is triggered and the number is pasted in the homedir. (This can be read along with the battery voltage by sending a ssh remote command, which i do from my phone and see the results) - Works good as i intended :)

Jesper.
 

TNT

Member
Joined 2003
Paid Member
I'm now on 0.5.0 :) thanks to Henriks new Mac install script.

You have to be very clear about this with me: What goes into the ESP32 and what shall go to the server (if anything) :)

I see the python script in post #191 - thats should run on my Mac - where?

You: ...BLE and python stuff on the MAC... "BLE stuff"... ehh? :)

Is a 24 p/v encoder OK?

Reduce the ESP32 Power Consumption in 3 Simple Steps - DIYI0T

//
 
Morning; :)

Did you think more about level/battery indicator?
Yes and no... I'am sure it's possible but using 2pcs. of segment display is ::
1.) If it should sit in/on the remote box where the ESP32 is, it will for sure use a LOT of battery, and also so many gpiopin's that we defently have to use some shiftregister or like to reduce the number of gpiopins used.

2.) If it would sit on the amplifier/pc/mac/raspberry end, we have no issue with battery ofcause, then we must connect the segment displays there. -The segment display use a lot of gpiopins as i wrote so it could also be an issue there, eventhrough i didn't look at this.

Where should it be TNT :D

I'm now on 0.5.0 thanks to Henriks new Mac install script.

You have to be very clear about this with me: What goes into the ESP32 and what shall go to the server (if anything)

I see the python script in post #191 - thats should run on my Mac - where?

You: ...BLE and python stuff on the MAC... "BLE stuff"... ehh?

Is a 24 p/v encoder OK?

Great news camilladsp 5 is running on the Mac now :)

My setup is ment to run on a Raspberry Pi with TinyCore Linux / picorePlayer 6.10 or like ::
Well i will eventually (maybee... no promises) write a guide for this!

The Arduino script/sketch are installed on the ESP32 and is running there with usb or battery power. The ESP32 must be programmed through the Arduino IDE, there are lot's of guides around the www. for this. - The lib's needed are written in the "header" of my script!
Code:
// 
// SuperPlayer Bluetooth (BLE) Controller 
// Build from different sources (www)
// Jesper Lykke [User :: Lykkedk @ diyaudio.com]
//
// Lib's needed :: (Installed from Arduino IDE)
//
// [url=https://github.com/mickey9801/ButtonFever]GitHub - mickey9801/ButtonFever: Powerful button tools for managing various button events of standalone button or button array.[/url]
// [url=https://github.com/madhephaestus/ESP32Encoder/]GitHub - madhephaestus/ESP32Encoder: A Quadrature and half quadrature PCNT peripheral driven encoder library supporting 10 encoders[/url]
//

The Python script are installed on my Raspberry pi, should reside on your'e mac for this setup.

You: ...BLE and python stuff on the MAC... "BLE stuff"... ehh?
BLE = Bluetooth Low Energy ;)

You need to somehow install some BLE/Bluetooth stuff on the Mac so that it can recieve the commands from the ESP32.
I use BlueZ on my Raspberry Pi for this. -Also python libary are needed, i use bluepy for this, but i'am sure there are other way's also?
Mac is unknown country for me sry... but maybee BLE-tools like hcitool & gatttool for testing/setting up BLE are avaliable on the Mac?

Is a 24 p/v encoder OK?
I use this one ::
Rotary Encoder Modul

How long will a 4400mAh battery last do you think?
Can't tell yet; i use a 750mAh one for now; so 4400mAh will ofcause last way looonger :D

Some Links ::
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjuzJvi5tvtAhXnkosKHcJqBtgQFjAAegQIAxAC&url=https%3A%2F%2Fgithub.com%2FIanHarvey%2Fbluepy&usg=AOvVaw1Uq1cjhzWlg0x8j2MtxUzY

BlueZ

Thanks for the link btw.

Jesper.
 

Attachments

  • SuperPlayer_Remote.zip
    6.2 KB · Views: 42
Last edited:

TNT

Member
Joined 2003
Paid Member
OK!

Do you think you can prepare someting that I could load into a ESP32 - I'm sure I cant collect all that and ensemble it :(

Oh - is that the attached .ino file?

OK, I need to check for Mac BLE support.

I think that the level display and the battery indicator should be on the control device itself but it could be activated by a button so to draw current only when activated. I did som calculations on battery life and realise it is somewhat of a challenge. Ideally under normal use one would not have to recharge more than every other week. I suppose responsiveness is what must suffer somehow so that a lot of sleep can be allowed. But maybe is not such a important feature... as long as one can charge while using it... maybe I'll pick a 1500mAh one.

Need to check all the software aspect before I order all this.. thanks for the answers!!

My Mac Mini says:

Apple Bluetooth Software Version: 7.0.6f8
Hardware, Features and Settings:
Name: Au
Address: 28-..
Bluetooth Low Energy Supported: Yes

//
 
Last edited: