Brutefir: Filterbänke per FB umschalten

steos
Aktiver Hörer
Beiträge: 45
Registriert: 19.05.2011, 13:38

Brutefir: Filterbänke per FB umschalten

Beitrag von steos »

Hallo

Ich möchte meinen Brutefir Convolver "Brüggemann Stick" mit einer Fernbedienung die Filterbänke umschalten.

Gibt es irgendwo eine Info wo ich nachschauen könnte bzw. macht das schon jemand von Euch?

lg
steos
Bild
LS_Karl
Aktiver Hörer
Beiträge: 36
Registriert: 16.01.2010, 13:46

Beitrag von LS_Karl »

Hallo Steos.

Siehe wegen eines kompatiblen Geräte-Treibers hier: http://www.lirc.org/

und im acourate Forum http://tech.groups.yahoo.com/group/acourate/

Filter die Messages im Forum nach "lirc" und schaue im Files Ordner.

Die CLI-brutefir script Befehle sind hier beschrieben:
http://www.ludd.luth.se/~torger/brutefi ... flogic_cli

Viel Erfolg wünscht

Karl
Bild
steos
Aktiver Hörer
Beiträge: 45
Registriert: 19.05.2011, 13:38

Beitrag von steos »

Hallo

Danke für die Info
aber ich wollte mir das mit Yahoo sparen.

lg
steos
Bild
steos
Aktiver Hörer
Beiträge: 45
Registriert: 19.05.2011, 13:38

Beitrag von steos »

Hallo

das mit der FB und Brutefir geht weiter.

Über das CLI mit RS232 schaffe ich es zu muten aber beim Filterumschalten geht immer was schief.
So schaut meine FB aus leider funktioniert noch nicht ganz.

Bild

Das ist der String zum Filterumschalten
cfc "TTlf" "TTl1" ; sleep 20 ;cfc "TTrf" "TTr1" ; sleep 20 ; cfc "TMTlf" "TMTl1" ; sleep 20 ; cfc "TMTrf" "TMTr1" ; sleep 20 ; cfc "MTlf" "MTl1" ; sleep 20 ; cfc "MTrf" "MTr1" ; sleep 20 ; cfc "HTlf" "HTl1" ; sleep 20 ; cfc "HTrf" "HTr1" ; sleep 20 ;
habe ich da einen Denkfehler???

lg
steos
Bild
uli.brueggemann
Aktiver Hersteller
Beiträge: 4658
Registriert: 23.03.2009, 15:58
Wohnort: 33649
Kontaktdaten:

Beitrag von uli.brueggemann »

Hi Steos,

in der Brutefir config müssen die Filter alle geladen werden. Also in etwa

coeff "left" ...
coeff "right" ...
coeff "left2" ...
coeff "right2" ...

Und im 1. Umschaltskript steht dann

Code: Alles auswählen

#!/bin/sh
echo "cfc 0 0; cfc 1 1;quit" | nc localhost 3000 > /dev/null
für filter left/right

Und im 2. Umschaltskript steht dann

Code: Alles auswählen

#!/bin/sh
echo "cfc 0 2; cfc 1 3; quit" | nc localhost 3000 > /dev/null
für filter left2/right2

gemeint ist

0 0 = filter 0 erster Filterdatensatz 0 = left
1 1 = filter 1 erster Filterdatensatz 1 = right
0 2 = filter 0 zweiter Filterdatensatz 2 = left2
1 3 = filter 1 zweiter filterdtensatz 3 = right2

Grüsse, Uli
Bild
steos
Aktiver Hörer
Beiträge: 45
Registriert: 19.05.2011, 13:38

Beitrag von steos »

Hallo Uli,

ich steh auf der Leitung meine config schaut dan so aus??

Code: Alles auswählen

## DEFAULT GENERAL SETTINGS ##

float_bits: 64;             # internal floating point precision
sampling_rate: 44100;       # sampling rate in Hz of audio interfaces
filter_length: 4096,32;     # length of filters
overflow_warnings: true;    # echo warnings to stderr if overflow occurs
show_progress: false;        # echo filtering progress to stderr
max_dither_table_size: 0;   # maximum size in bytes of precalculated dither
allow_poll_mode: true;     # allow use of input poll mode
modules_path: "/usr/lib/brutefir";   # extra path where to find BruteFIR modules
monitor_rate: true;        # monitor sample rate
powersave: true;           # pause filtering when input is zero
lock_memory: false;          # try to lock memory if realtime prio is set
convolver_config: "/home/audiovero/.brutefir_convolver"; # location of convolver config file

## LOGIC ##

#logic: "cli" { port: 3000; };
 logic: "cli" { port: "/dev/ttyS0"; };

## TT  ################################################################
coeff "TTleft1" {
       filename: "/audiovero/brutefir/filter/1COR44/Cor1L44.dbl";
       format: "FLOAT64_LE";
};

coeff "TTright1" {
       filename: "/audiovero/brutefir/filter/1COR44/Cor1R44.dbl";
       format: "FLOAT64_LE";
};

coeff "TTleft2" {
       filename: "/audiovero/brutefir/filter/2COR44/Cor1L44.dbl";
       format: "FLOAT64_LE";
};

coeff "TTright2" {
       filename: "/audiovero/brutefir/filter/2COR44/Cor1R44.dbl";
       format: "FLOAT64_LE";
};

## TMT  ################################################################
coeff "TMTleft1" {
       filename: "/audiovero/brutefir/filter/1COR44/Cor2L44.dbl";        
       format: "FLOAT64_LE";
};

coeff "TMTright1" {
       filename: "/audiovero/brutefir/filter/1COR44/Cor2R44.dbl";        
       format: "FLOAT64_LE";
};

coeff "TMTleft2" {
       filename: "/audiovero/brutefir/filter/2COR44/Cor2L44.dbl";        
       format: "FLOAT64_LE";
};

coeff "TMTright2" {
       filename: "/audiovero/brutefir/filter/2COR44/Cor2R44.dbl";        
       format: "FLOAT64_LE";
};

## MT  ################################################################
coeff "MTleft1" {
       filename: "/audiovero/brutefir/filter/1COR44/Cor3L44.dbl";        
       format: "FLOAT64_LE";
};

coeff "MTright1" {
       filename: "/audiovero/brutefir/filter/1COR44/Cor3R44.dbl";        
       format: "FLOAT64_LE";
};

coeff "MTleft2" {
       filename: "/audiovero/brutefir/filter/2COR44/Cor3L44.dbl";        
       format: "FLOAT64_LE";
};

coeff "MTright2" {
       filename: "/audiovero/brutefir/filter/2COR44/Cor3R44.dbl";        
       format: "FLOAT64_LE";
};

## HT  ################################################################
coeff "HTleft1" {
       filename: "/audiovero/brutefir/filter/1COR44/Cor4L44.dbl";        
       format: "FLOAT64_LE";
};

coeff "HTright1" {
       filename: "/audiovero/brutefir/filter/1COR44/Cor4R44.dbl";
       format: "FLOAT64_LE";
};	

coeff "HTleft2" {
       filename: "/audiovero/brutefir/filter/2COR44/Cor4L44.dbl";        
       format: "FLOAT64_LE";
};

coeff "HTright2" {
       filename: "/audiovero/brutefir/filter/2COR44/Cor4R44.dbl";
       format: "FLOAT64_LE";
};
	
################################# OUTPUT  #############################

output "TTlout","TTrout","TMTlout","TMTrout","MTlout","MTrout","HTlout","HTrout" { device: "alsa" { device: "hw:0";}; # ignore_xrun: true; };
        sample: "S24_4LE";
        channels: 10/0,1,2,3,4,5,6,7;   # analog raus
#        delay: 0,0,264,264,210,210,211,211;
#       dither: true;
};

################################ INPUT  ################################

input "leftin", "rightin" {
       device: "alsa" { device: "hw:0";}; # ignore_xrun: true; };
       sample: "S24_4LE";
       channels: 12/8,9;  # digital rein	
};

########################### FILTERS DRIVERS 1 ##########################

## TT  ################################################################

filter "TTlfilter1" {
        from_inputs: "leftin"/0.5;
        to_outputs: "TTlout";
        coeff: "TTleft1";
#        coeff: -1 ;
};

filter "TTrfilter1" {
        from_inputs: "rightin"/0.5;
        to_outputs: "TTrout";
        coeff: "TTright1";
#        coeff: -1 ;
};

## TMT  ################################################################

filter "TMTlfilter1" {
        from_inputs: "leftin"/0.5;
        to_outputs: "TMTlout";
        coeff: "TMTleft1";
#        coeff: -1 ;
};

filter "TMTrfilter1" {
        from_inputs: "rightin"/0.5;
        to_outputs: "TMTrout";
        coeff: "TMTright1";
#        coeff: -1 ;
};

## MT  ################################################################

filter "MTlfilter1" {
        from_inputs: "leftin"/0.5;
        to_outputs: "MTlout";
        coeff: "MTleft1";
#        coeff: -1 ;
};

filter "MTrfilter1" {
        from_inputs: "rightin"/0.5;
        to_outputs: "MTrout";
        coeff: "MTright1";
#        coeff: -1 ;
};

## HT  ################################################################

filter "HTlfilter1" {
        from_inputs: "leftin"/0.5;
        to_outputs: "HTlout";
        coeff: "HTleft1";
#        coeff: -1 ;
};

filter "HTrfilter1" {
        from_inputs: "rightin"/0.5;
        to_outputs: "HTrout";
        coeff: "HTright1";
#        coeff: -1 ;
};

########################### FILTERS DRIVERS 2 ##########################

## TT  ################################################################

filter "TTlfilter2" {
        from_inputs: "leftin"/0.5;
        to_outputs: "TTlout";
        coeff: "TTleft2";
#        coeff: -1 ;
};

filter "TTrfilter2" {
        from_inputs: "rightin"/0.5;
        to_outputs: "TTrout";
        coeff: "TTright2";
#        coeff: -1 ;
};

## TMT  ################################################################

filter "TMTlfilter2" {
        from_inputs: "leftin"/0.5;
        to_outputs: "TMTlout";
        coeff: "TMTleft2";
#        coeff: -1 ;
};

filter "TMTrfilter2" {
        from_inputs: "rightin"/0.5;
        to_outputs: "TMTrout";
        coeff: "TMTright2";
#        coeff: -1 ;
};

## MT  ################################################################

filter "MTlfilter2" {
        from_inputs: "leftin"/0.5;
        to_outputs: "MTlout";
        coeff: "MTleft2";
#        coeff: -1 ;
};

filter "MTrfilter2" {
        from_inputs: "rightin"/0.5;
        to_outputs: "MTrout";
        coeff: "MTright2";
#        coeff: -1 ;
};

## HT  ################################################################

filter "HTlfilter2" {
        from_inputs: "leftin"/0.5;
        to_outputs: "HTlout";
        coeff: "HTleft2";
#        coeff: -1 ;
};

filter "HTrfilter2" {
        from_inputs: "rightin"/0.5;
        to_outputs: "HTrout";
        coeff: "HTright2";
#        coeff: -1 ;
};
Bild
Udor
Aktiver Hörer
Beiträge: 389
Registriert: 02.09.2010, 00:17

Beitrag von Udor »

Hi Steos

Du hast es fast :wink:

Ich versuchs mal zu erklären. Bei deinem 3-Wege Setup hast du 6 Coeffs(Filter). Wenn Bruetfir startet werden die ersten 6 Coeffs als default geladen und den 6 Kanälen zugewiesen.
Deshalb dürfen die ersten 6 Coeffs auch nur Filter vom ersten Set sein. Die nächsten 6 Coeffs sind dann Set2 und so weiter. Theoretisch kannst du so auch 193 Coeffs konfigurieren :mrgreen:

Bei mir mit 8 Kanälen und 4 Sets(32 Coeffs) sieht das dann so aus:

Code: Alles auswählen

float_bits: 64;                            # internal floatingpoint precision
sampling_rate: 48000;                      # samplerate in hz of audio Interface
filter_length: 4096,16;                    # length of Filters
overflow_warnings: true;                   # echo warnings to stdrr if overflow occurs
show_progress: false;                       # echo filtering progress to stderr
max_dither_table_size: 0;                  # maximum size in bytes of precalculatet dither
allow_poll_mode: false;                    # allow use of input poll mode
modules_path:".";                          # extra path where to find BruteFir modules
monitor_rate: false;                       # monitor sample rate
convolver_config: "~/.brutefir_convolver"; # location of convolver config file

logic: "cli" { port: 3000; };

#######  EQ COEFFS  #######

##### SET 1 #####

## Linke Box ##

coeff "xo_TT_links" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/Cor2L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_MT_links" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/Cor3L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_HT_links" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/Cor4L48.dbl";
        format: "FLOAT64_LE";
};

## Rechte Box ## 

coeff "xo_TT_rechts" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/Cor2L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_MT_rechts" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/Cor3L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_HT_rechts" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/Cor4L48.dbl";
        format: "FLOAT64_LE";
};

## SUBWOOFER ##

coeff "xo_sub_links" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/Cor1L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_sub_rechts" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/Cor1R48.dbl";
        format: "FLOAT64_LE";
};

##### SET 2 ######

## Linke Box ##

coeff "xo_TT_links_1" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set2/Cor2L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_MT_links_1" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set2/Cor3L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_HT_links_1" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set2/Cor4L48.dbl";
        format: "FLOAT64_LE";
};

## Rechte Box ## 

coeff "xo_TT_rechts_1" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set2/Cor2L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_MT_rechts_1" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set2/Cor3L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_HT_rechts_1" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set2/Cor4L48.dbl";
        format: "FLOAT64_LE";
};

## SUBWOOFER ##

coeff "xo_sub_links_1" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set2/Cor1L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_sub_rechts_1" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set2/Cor1R48.dbl";
        format: "FLOAT64_LE";
};

##### SET 3 ######

## Linke Box ##

coeff "xo_TT_links_2" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set3/Cor2L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_MT_links_2" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set3/Cor3L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_HT_links_2" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set3/Cor4L48.dbl";
        format: "FLOAT64_LE";
};

## Rechte Box ## 

coeff "xo_TT_rechts_2" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set3/Cor2L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_MT_rechts_2" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set3/Cor3L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_HT_rechts_2" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set3/Cor4L48.dbl";
        format: "FLOAT64_LE";
};

## SUBWOOFER ##

coeff "xo_sub_links_2" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set3/Cor1L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_sub_rechts_2" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set3/Cor1R48.dbl";
        format: "FLOAT64_LE";
};

##### SET 4 ######

## Linke Box ##

coeff "xo_TT_links_3" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set4/Cor2L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_MT_links_3" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set4/Cor3L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_HT_links_3" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set4/Cor4L48.dbl";
        format: "FLOAT64_LE";
};

## Rechte Box ## 

coeff "xo_TT_rechts_3" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set4/Cor2L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_MT_rechts_3" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set4/Cor3L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_HT_rechts_3" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set4/Cor4L48.dbl";
        format: "FLOAT64_LE";
};

## SUBWOOFER ##

coeff "xo_sub_links_3" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set4/Cor1L48.dbl";
        format: "FLOAT64_LE";
};

coeff "xo_sub_rechts_3" {
        filename: "/home/udo/audiovero/brutefir/filter/roomkorr/XO-80-250-2800_double-bass/set4/Cor1R48.dbl";
        format: "FLOAT64_LE";
};

###### INPUT-OUTPUT ######

## INPUT ##

input "left-in", "right-in" {
        device: "jack"  { priority:9 ; ports: "aqualung:out_L", "aqualung:out_R"; };
        sample: "AUTO";
        channels: 2/0,1;
};

## OUTPUT ##

output "1_TT-out_links", "2_TT-out_rechts", "3_MT-out_links", "4_MT-out_rechts", "5_HT-out_links", "6_HT-out_rechts", "7_sub_out_links", "8_sub_out_rechts" {
        device: "jack" { ports: "system:playback_1", "system:playback_2", "system:playback_3", "system:playback_4", "system:playback_5", "system:playback_6", "system:playback_7", "system:playback_8" ; };
        sample: "AUTO";
        channels: 8/0,1,2,3,4,5,6,7;
        delay: 53,72,24,24,0,1,3,3;
        dither: true;
};


###### EQ Filter ######

## Linke Box ##

filter "TT_links" {
	from_inputs: "left-in";
	to_outputs: "1_TT-out_links";
        coeff: "xo_TT_links";
};

filter "MT_links" {
	from_inputs: "left-in";
	to_outputs: "3_MT-out_links";
        coeff: "xo_MT_links";
};

filter "HT_links" {
	from_inputs: "left-in";
	to_outputs: "5_HT-out_links";
        coeff: "xo_HT_links";
};

## Rechte Box ##

filter "TT_rechts" {
	from_inputs: "right-in";
	to_outputs: "2_TT-out_rechts";
        coeff: "xo_TT_rechts";
};

filter "MT_rechts" {
	from_inputs: "right-in";
	to_outputs: "4_MT-out_rechts";
        coeff: "xo_MT_rechts";
};

filter "HT_rechts" {
	from_inputs: "right-in";
	to_outputs: "6_HT-out_rechts";
        coeff: "xo_HT_rechts";
};

## SUBWOOFER ##

filter "SUB_links" {
	from_inputs: "left-in"//-1;
	to_outputs: "7_sub_out_links";
        coeff: "xo_sub_links";
};

filter "SUB_rechts" {
	from_inputs: "right-in"//-1;
	to_outputs: "8_sub_out_rechts";
        coeff: "xo_sub_rechts";
};
Aufpassen Brutefir fängt bei 0 an zu zählen. Also coeff 0=Kanal1(TT_L), Coeff1=Kanal2(TT_R) .....
Ich hab mir eine Tabelle gemacht damit man nicht durcheinander kommt bei der Config. Bei falscher konfiguration hat man schnell mal dem HT das falsche Signal zugewiesen...

Was für eine Software nutzt du da zum Fernbedienen?

Edit: fast vergessen das Filterrouting am ende der Config braucht nur einmal konfiguriert werden bleiben also so als wenn du nur 6 Coeffs hast. Brutefir setzt automatisch die Coeffs des zweiten Satzes als Filter ein beim Umschalten.

Gruß Udo
Bild
Udor
Aktiver Hörer
Beiträge: 389
Registriert: 02.09.2010, 00:17

Beitrag von Udor »

Wenn du noch ein bisschen spielen willst hier noch ein Perl Skript zum umschalten der Filter(8-Kanal).
Damit schalte ich meine Filter um. Die Tasten 1-4 wechseln den Filter, 5 beendet das Skript.

Dazu muss aber libnet-telnet-perl installiert sein. Ich befürchte das SPB das nicht hat.
Alternativ kannst du die CFC Befehle aber aus dem Skript entnehmen und für dich entsprechend anpassen.

Code: Alles auswählen

#!/usr/bin/perl -w
# ******************************************************************************
# bfircli.pl Control BruteFIR via its Telnet port.
# Copyright (C) 2005 Neil J Mackie
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#    You can contact the author on Internet at the following address:
#    bfircli at mackiefamily.net
# ******************************************************************************
# WHAT YOU NEED TO RUN IT
# This is a perl script so you will need perl to run it.
# You will also need the perl module Net::Telnet .
# 
# You will also need Brutefir configured with the 'cli' module, 
# see the Brutefir documentation for details.
# ******************************************************************************
# WHAT & HOW TO CUSTOMISE
# Change the variable $bfirport to be the Telnet port the BruteFIR cli module 
# is configured to use.
# If BruteFIR is running on a different machine change $bfirhost to be 
# the name of the host it is running on.
# Modify the prompt() subroutine to display the options you want.
#
# The script prompts the user to enter a number within a range. The numbers 
# entered causes a set of commands to be sent to BruteFIR. Your BruteFIR setup 
# will determine the number of choices you want and the exact commands each 
# will send. Edit the code within the while loop to match your number of choices,
# and edit the commands sent according to your BriteFIR configuration. 
# The code is commented to guide you.
# ******************************************************************************

use strict;
use warnings;

use Net::Telnet ();

my $bfirhost = "localhost"; # change if BruteFIR is running on a 
                            # remote machine
my $bfirport = 3000;        # change to match the port number of the 
                            # BruteFIR cli module
my $choice;                 # stores users choice
my $choices = 5;            # change to match the number of choices given
my $finished = 0;           # set true to finish
my $indicate = 1;           # set true to indicate users choice
my $prompt = 1;             # set true to prompt
my $status;                 # for status
my $t;                      # stores telnet object

# open the bfir cli control port  
$t = Net::Telnet->new( Timeout =>10, Prompt => '/>/', Errmode=>'die');
$status = $t->open(Host => $bfirhost, Port => $bfirport);

# get user input and change bfir filter till user quits
prompt();
while (!$finished && ($choice = readkey()) != "5") {
    # 1 quit the program
    if ($choice == 5) {
	$finished = 1;
	$prompt = 0;
	}
    # 2 assumes 2 filters 0 & 1, a stereo pair l & r
    # sets coefficients to -1 (no filtering), 
    # attenuates both filters by 4db to equalise levels with DRC filters.
    elsif ($choice == 1) {
	$status = $t->cmd("cfc 0 0; cfc 1 1; cfc 2 2; cfc 3 3; cfc 4 4; cfc 5 5 ; cfc 6 6; cfc 7 7");
    }
    # 3 assumes 2 filters 0 & 1, and two coefficients 0 & 1
    # sets filter 0 with coefficient 0, sets filter 1 with coefficient 1
    # sets attenuation to 0db on both filters (see choice 2).
    elsif ($choice == 2) {
	$status = $t->cmd("cfc 0 8; cfc 1 9; cfc 2 10; cfc 3 11; cfc 4 12; cfc 5 13; cfc 6 14; cfc 7 15");
    }
    # 4 assumes 2 filters 0 & 1, and another set of DRC coefficients 2 & 3
    # sets filter 0 with coefficient 2, sets filter 1 with coefficient 3
    # sets attenuation to 0db on both filters
    elsif ($choice == 3) {
	$status = $t->cmd("cfc 0 16; cfc 1 17; cfc 2 18; cfc 3 19; cfc 4 20; cfc 5 21; cfc 6 22; cfc 7 23;");
    }
    # 5 assumes 2 filters 0 & 1, and another set of DRC coefficients 4 & 5
    # sets filter 0 with coefficient 4, sets filter 1 with coefficient 5
    # sets attenuation to 0db on both filters
    elsif ($choice == 4) {
	$status = $t->cmd("cfc 0 24; cfc 1 25; cfc 2 26; cfc 3 27; cfc 4 28; cfc 5 29; cfc 6 30; cfc 7 31");
    }
    # choice is outwith the range, indicate to user and exit 
    else { 
	$finished = 1;
	$indicate = 0;
	$prompt = 0;
    }
    if ($indicate) { indicate($choice); }
    if ($prompt) { prompt(); }
} 
$status = $t->cmd("quit");
$t->close;

# indicate - give a visual indication of the first parameter.
# $_[0]  number to indicate on the screen, in range 1-$choices .
sub indicate {
    my ($i); my ($j); my ($k);
    for ($i = 1; $i <= $choices; $i++)
    {
	for ($j = 1; $j < $_[0]; $j++) {
	    print("   ");
	}
	for ($k = 1; $k <= $_[0]; $k++) {
	    print("  #");
	    }
	print("\n");
    }
}

# prompt - output the user options.
# change to match your number of choices and the names you give them.
sub prompt {
    print("1) Filtersatz_1\n");
    print("2) Filtersatz_2\n");
    print("3) Filtersatz_3\n");
    print("4) Filtersatz_4\n");
    print("5) quit_brfir_cli\n");
}

sub readkey {
    my $key;
    open(TTY, "+</dev/tty") or die "no tty: $!";
    system "stty cbreak </dev/tty >/dev/tty 2>&1";
    sysread(TTY, $key, 1);
    system "stty -cbreak </dev/tty >/dev/tty 2>&1";
    close(TTY);
    return $key;
}
# end bfircli.pl

Gruß Udo
Bild
steos
Aktiver Hörer
Beiträge: 45
Registriert: 19.05.2011, 13:38

Beitrag von steos »

Hallo

so ich glaube ich habe es
für ein 8 kanal setup
16x coeff in brutefir und 8x filter das heisst ich habe ein matrix 16-8

Udo
die software ist von Abacom ProfiLab, ist halt für mein bastelzeug nicht schlecht :wink:

lg
steos
Bild
Udor
Aktiver Hörer
Beiträge: 389
Registriert: 02.09.2010, 00:17

Beitrag von Udor »

steos hat geschrieben:so ich glaube ich habe es
für ein 8 kanal setup
16x coeff in brutefir und 8x filter das heisst ich habe ein matrix 16-8
:cheers:

Viel Spass beim Filtertesten. Imho kann man damit erst wirklich die Filter beurteilen. Manchmal hatte ich Mühe überhaupt Unterschiede festzustellen (bei kleinen Änderungen), da das Umschalten so gut wie kein break verursacht.

Gruß Udo
Bild
steos
Aktiver Hörer
Beiträge: 45
Registriert: 19.05.2011, 13:38

Beitrag von steos »

Hallo

geht schon danke für die Hilfe :cheers:
leider scheint wo der Wurm bei der RS232 Schnittstelle zu sein da von 5x Umschalten 1x ein Fehler kommt

Filter 1:

Code: Alles auswählen

cfc 0 0 ;cfc 1 1 ;cfc 2 2 ;cfc 3 3 ;cfc 4 4 ;cfc 5 5 ;cfc 6 6 ;cfc 7 7;
Filter 2:

Code: Alles auswählen

cfc 0 8; cfc 1 9; cfc 2 10; cfc 3 11; cfc 4 12; cfc 5 13; cfc 6 14; cfc 7 15;
lg
steos
Bild
uli.brueggemann
Aktiver Hersteller
Beiträge: 4658
Registriert: 23.03.2009, 15:58
Wohnort: 33649
Kontaktdaten:

Beitrag von uli.brueggemann »

Steos,

ich weiss nicht wie das bei Linux-Skripten mit Leerzeichen ist. Auf jeden Fall wechseln die bei den beiden Kommandos, manchmal hast Du das Semikolon direkt dahinter, manchmal nicht.

Uli
Bild
Udor
Aktiver Hörer
Beiträge: 389
Registriert: 02.09.2010, 00:17

Beitrag von Udor »

Das Kommando ist ok.

RS232 ?? Hängt der IR Sender/Empfänger an der seriellen Schnittstelle oder wie sieht deine Konfig jetzt aus ?

Gruß Udo
Bild
steos
Aktiver Hörer
Beiträge: 45
Registriert: 19.05.2011, 13:38

Beitrag von steos »

Hallo Uli+Udo

ok werde das Semikolon gleich mal dahintersetzen.

Brutefir CLI läuft über die RS 232 Schnittstelle und via einem Terminal gehe ich auf Brutefir und schalte so die Filterbänke um.
Meine "FB" ist halt nur so ein Button to Code

lg
Stefan
Bild
steos
Aktiver Hörer
Beiträge: 45
Registriert: 19.05.2011, 13:38

Beitrag von steos »

Hallo

so meine kleine Software läuft
Muten, Filterumschalten,Command senden und Monitoring geht.
Wer die "steos BRUTEFIR REMOTE" habe möchte einfach melden.

Noch eine Frage funktioniert Brutefir auch mit 2x M-Audio 1010LT?

lg
steos

PS Danke an Uli und Udor für die Hilfe
Bild
Antworten