pax_global_header00006660000000000000000000000064115122045370014512gustar00rootroot0000000000000052 comment=f9fb65d47e25d6af904ee9aa1a489c86b4bac8dc jack-rack-f9fb65d/000077500000000000000000000000001151220453700140475ustar00rootroot00000000000000jack-rack-f9fb65d/AUTHORS000066400000000000000000000001171151220453700151160ustar00rootroot00000000000000Bob Ham Leslie P. Polzer jack-rack-f9fb65d/BUGS000066400000000000000000000001301151220453700145240ustar00rootroot00000000000000* the gnome about box generates warnings on closing if you don't open the Credits box jack-rack-f9fb65d/ChangeLog000066400000000000000000000025461151220453700156300ustar00rootroot00000000000000! I can't keep the change log up-to-date right now, so you'll have to ! stick with CVS logs. ! If I get support in the form of patches or money, I will probably ! pick it up again. Code is more important than change logs. ! -- Leslie 2005-06-06 Leslie Polzer * src/ui_callbacks.c: adjusted web site and authors 2005-06-05 Leslie Polzer * src/globals.h, src/main.c: Added global GString* initial_filename * src/main.c (print_help): added usage information for filename on command line (if HAVE_XML) * src/main.c (main): added parsing of non-option initial_filename (if HAVE_XML) * src/ui.c (ui_init_gui): added opening of initial rack if given on command line (if HAVE_XML) 2005-05-21 Leslie Polzer * src/globals.h: deactivated GNOME-i18n, it seems to be broken * autogen.sh: removed '-1.6' suffix from tools * m4: removed directory (obsolete) * Makefile.am (ACLOCAL_AMFLAGS): removed (obsolete) * configure.ac (AC_OUTPUT): removed m4/Makefile 2005-04-15 Bob Ham * src/main.c: Removed jack_set_default_dir references * configure.ac: upped version to 1.4.4 2003-07-03 gettextize * Makefile.am (SUBDIRS): Add m4. (ACLOCAL_AMFLAGS): New variable. (EXTRA_DIST): Add config.rpath. * configure.ac (AC_OUTPUT): Add po/Makefile.in, jack-rack-f9fb65d/Doxyfile000066400000000000000000001417001151220453700155600ustar00rootroot00000000000000# Doxyfile 1.4.2 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = JACK Rack # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = CVS # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = docs/devel # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, # Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, # Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, # Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, # Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # This tag can be used to specify the encoding used in the generated output. # The encoding is not always determined by the language that is chosen, # but also whether or not the output is meant for Windows or non-Windows users. # In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES # forces the Windows encoding (this is the default for the Windows binary), # whereas setting the tag to NO uses a Unix-style encoding (the default for # all platforms other than Windows). USE_WINDOWS_ENCODING = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources # only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = YES # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = YES # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = NO # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= NO # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. SHOW_DIRECTORIES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from the # version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the progam writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = src # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = YES # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = YES # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_PREDEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that a graph may be further truncated if the graph's # image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH # and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), # the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO jack-rack-f9fb65d/Makefile.am000066400000000000000000000003751151220453700161100ustar00rootroot00000000000000SUBDIRS = pixmaps src po EXTRA_DIST = config.rpath mkinstalldirs \ autogen.sh \ BUGS \ WISHLIST \ jack-rack.desktop \ ecarack bin_SCRIPTS = ecarack desktopdir = $(datadir)/applications desktop_DATA = jack-rack.desktop ACLOCAL_AMFLAGS = -I m4 jack-rack-f9fb65d/NEWS000066400000000000000000000136301151220453700145510ustar00rootroot000000000000001.4.8: * (Torben Hohn joined the maintainers) * (development moved from CVS to Git) * Add support for jack-session. * Fix bugs in MIDI controls (patch from Peter Nelson). * Add a Czech translation (patch from Pavel Fric). * Update the Russian translation (patch from Alexandre Prokoudine). * Check for an appropriate GTK+ version (reported by Steven Chamberlain). 1.4.7: * Use the correct channel numbers when sending control messages (reported by Danni Coy). * Use the new GTK tooltips API (reported by Owen Williams and Stanislav Karchebny). * Removed support for the old LADCCA interface, and cleaned everything up to refer to LASH instead. 1.4.6: * Updated fr_FR translation (patch from Raphal Doursenaud). * Don't rely on being able to set and use the default gettext domain; some buggy LADSPA plugins clobber it (reported by Raphal Doursenaud). * Always install pixmaps and the application file into the installation prefix. * Mark many more messages for translation. * Put the user-visible copyright messages in a central place. * Allow effects to be toggled on and off by MIDI (patch from Scott Davidson). * Add de_DE translation (patch from Sebastian Arnold). * Assign default control values to the correct controls (reported by Tim Goetze). * Experimental support for 14-bit MIDI control messages (suggested by Florent Berthaut). * Allow the range of values that MIDI controls cover to be chosen (patch from Dmitry Baikov). * Ellipsize the text in the splash screen, so that the window doesn't keep resizing. * When the RDF description of a plugin contains named points, show the value as a combo box (suggested by Tim Goetze). * Added a script (ecarack) to run an approximation of a JACK Rack config using ecasound, which lets you design an effects chain in JACK Rack and then run it on a headless system. * Fix a bug with integer controls (which I'd replicated into the points controls code too), where they'd only set the first channel's value when locked. 1.4.5: * JACK connection loss now employs automatic reconnect * widgets controlled via MIDI now get all their channels updated * added french translation * applied patch from Mark Vitek that supports the latest LASH API changes * corrected MIDI controller numbering (reported by James Stone) * internal: introduced flexible status and error handlers * (now maintained by Adam Sampson) * Various cleanups to the source code. * Use the new GTK about dialog and toolbar APIs (the major effect of which is that the "add" button in the toolbar now looks different). * Use the correct dialogs when opening and saving files. * Disconnect safely from JACK upon shutdown (patch from Florian Paul Schmidt). * Make the configure script check for the LADSPA header. * Fix LASH support (reported by Brian Dunn). 1.4.4: * user may specify a rack file to be loaded at startup now * removed references to jack_set_server_dir 1.4.3: * updated for ladcca 0.4.0 1.4.2: * fixed some segfaults * fixed some bad configure script checks * i18n support and Russian translation, courtesy of Alexey Voinov and Alexandre Prokoudine 1.4.1: * icon and .desktop get installed properly * much more graceful handling of jackd shutdowns * midi thread will now try and use SCHED_FIFO. If you run jackd with jackstart then you don't need to do anything to enable this as jackd will give the appropriate rights to jack rack. 1.4.0: * MIDI support 1.3.0: * you can now use plugins with unequal numbers of input and output ports. any excess ports get exposed as extra jack ports with names like "amplif_1-1_i2", of the form "_-_{i,o}" * wet/dry controls for the output of each plugin * logarithmic controls * much more resilient file loader 1.2.0: * can now have arbitrary channel numbers. you can use any plugin that has equal numbers of input and output channels where they divide exactly into the number of rack channels. eg, you could have a 4 channel rack with 2 stereo plugins in one slot and 4 mono plugins in another. obviously, you can also have mono racks now. use the -c command line option to specify the number of channels on startup. * now, when you lock a group of controls, only one widget will be shown. click on a control while holding down the CTRL key to make it the one that remains visible. * the PID is now used in the jack client name by default. you can change it to the previous behaviour (of using just "jack_rack") with the -n option. * save files now use an XML format (which is incompatible with the previous format, sorry) * port connecting works now, -i to connect inputs, -o to connect outputs * quite a bit of code factoring and cleanups and stuff 1.1.2: * build fixes for gcc 2.9x from Fernando Pablo Lopez-Lezcano * compiles with gtk 2.0 now (thanks to Fernando again) * builds without lrdf now (thanks to Austin Acton) 1.1.1: * fixed control output ports segfault * fixed desktop installation prefix stuff * fixed dealing with duplicate plugin ids * now quits when you close the window * added a "New" option to clear the rack * rack is now automatically cleared when you load a file 1.1: * proper ladcca support (pays attention to events) * added saving/loading rack configurations. this is a bit of a hack tho as when you open a file, it only adds the plugins to whatever's in the current rack. in fact, the whole of the file loading/saving is hairy atm. * added lrdf support (this is majorly phat.. categorised plugin menus :) * proper toolbar with stock buttons * added a menu bar * added a splash screen * added an about box (using gnome 2) * nice new icon and logo images, used for the splash screen, the window icons and also a gnome 2 .desktop * lots of code separation and cleanups and under-the-hood changes * control rows now have no central port label 1.0.1: * jack_set_server_dir is optional * LADCCA support * fixed bug dealing with LADSPA_PATH 1.0: * initial public release jack-rack-f9fb65d/README000066400000000000000000000041001151220453700147220ustar00rootroot00000000000000 JACK Rack README ==================== JACK Rack is a LADSPA effects rack for the JACK audio API. It uses GTK+ 2 (and optionally GNOME 2) for the GUI. LADSPA version 1.1 is needed. In order to save rack configurations, libxml2 is needed. It also understands LRDF XML descriptions of LADSPA plugins. LRDF support needs liblrdf, available from http://plugin.org.uk/lrdf/. This in turn needs raptor, available from http://www.redland.opensource.ac.uk/raptor/. Compilation ------------- The usual autoconf gubbins: ./configure && make && make install. See INSTALL for more details. Running --------- Assuming you have some LADSPA plugins installed, make sure you have your LADSPA_PATH environment variable set to include them. If you don't have any LADSPA plugins installed, head over to http://plugin.org.uk/ and grab Steve Harris's excellent plugin collection. JACK Rack searches for .rdf and .rdfs files in /usr/local/share/ladspa/rdf and /usr/share/ladspa/rdf by default. You can change this search path using the LADSPA_RDF_PATH environment variable. JACK Rack doesn't do any port connecting by default, so you might want to use QJackConnect or jack_connect to connect it up. Alternatively, if you use the -i command line option, JACK Rack will try to connect its input ports to the capture ports of whatever physical devices are in the system. The -o option works similarly for the outputs. When you lock a line of controls, all but one of the controls will be hidden. Using the Lock button, this will be the first control. This can hinder things if you want to use a value which isn't the first. In this case, you can hold down the CTRL key and click on the control you want to remain visible. The line will lock, but the clicked-on control will be the visible one. Clicking with mouse button 3 works similarly, but with Lock All instead. Right-clicking on plugin controls or wet/dry controls will bring up a context menu allowing you to add MIDI controls. Contact --------- See http://jack-rack.sourceforge.net/ for new versions and details of the jack-rack mailing lists. jack-rack-f9fb65d/THANKS000066400000000000000000000003251151220453700147620ustar00rootroot00000000000000These people contributed patches, bug reports, moral support, money, or anything else worthy of thanks. Thank you all :) * Fernando Pablo Lopez-Lezcano * Austin Acton * Jonathan Turner * Levi Burton * Jon Ellis jack-rack-f9fb65d/TODO000066400000000000000000000006721151220453700145440ustar00rootroot00000000000000for 1.4.5: ---------- * code custom about dialogue (removes dep on libgnomeui) * automatic reconnect on disconnect * documentation * JACK-Rack 1.4 DTD and file writing/reading code eventually ---------- * Sample rate callback * ladspa.m4 * Custom float widget * Reload * Display of plugins' execution time * Save window size/position * Gain controls for aux in/out * use plugin graphs instead of chains * use lrdf data over in-plugin data jack-rack-f9fb65d/WISHLIST000066400000000000000000000012321151220453700152360ustar00rootroot00000000000000GET RID OF ALL WARNINGS Changes in file format v1.4: - added author, description, notes - identify plugins by .so name and label instead of UID - documentation (manual, tool tips, recipes) DTD -> Schema - sort CAPS plugins - dssi support - list of favorite plugins - about dialogue - options dialogue (reconnect behavior) - german translation - remember last directory - list of recent rack files - static binary - MDI - drag'n'drop window for plugins - lirc support rack file repo - Make strict ANSI C (remove C99 comments, etc.) - Check for FIXMEs - Pixmap dir should default to being inside $(prefix) - Update README - Solo button to just hear one plugin jack-rack-f9fb65d/autogen.sh000077500000000000000000000000331151220453700160440ustar00rootroot00000000000000#!/bin/sh autoreconf -f -i jack-rack-f9fb65d/configure.ac000066400000000000000000000136531151220453700163450ustar00rootroot00000000000000AC_INIT([JACK Rack], 1.4.8rc1) AC_CONFIG_SRCDIR(src/lock_free_fifo.h) AM_INIT_AUTOMAKE(1.6) AM_CONFIG_HEADER(src/ac_config.h) AC_PROG_CC AM_PROG_CC_C_O #AC_PROG_LIBTOOL ############ ### JACK ### ############ PKG_CHECK_MODULES(JACK, jack >= 0.50.0, true, AC_MSG_ERROR([you need jack >= 0.50.0 see http://sf.net/projects/jackit])) JACK_VERSION=$( pkg-config --modversion jack ) AC_DEFINE_UNQUOTED(JACK_VERSION, "$JACK_VERSION", [The version of jack we're compiling against]) AC_SUBST(JACK_CFLAGS) AC_SUBST(JACK_LIBS) AC_CHECK_HEADER(jack/session.h, JACK_SESSION_FOUND="yes", JACK_SESSION_FOUND="no") if test "$JACK_SESSION_FOUND" = "yes"; then AC_DEFINE(HAVE_JACK_SESSION, 1, [whether jack/session.h is available]) fi ############## ### LADSPA ### ############## AC_CHECK_HEADER(ladspa.h, true, AC_MSG_ERROR([LADSPA is required see http://www.ladspa.org/])) ############ ### ALSA ### ############ jr_enable_aseq="yes" AC_ARG_ENABLE(aseq, [ --disable-aseq disable ALSA sequencer support],[ case "$enableval" in "yes") ;; "no") jr_enable_aseq="no" ;; *) AC_MSG_ERROR([must use --enable-aseq(=yes/no) or --disable-aseq]) ;; esac ]) if test "$jr_enable_aseq" = "yes"; then PKG_CHECK_MODULES(ALSA, alsa >= 0.9, ALSA_FOUND="yes", ALSA_FOUND="no") AC_SUBST(ALSA_CFLAGS) AC_SUBST(ALSA_LIBS) if test "$ALSA_FOUND" = "yes"; then AC_DEFINE(HAVE_ALSA, 1, [whether or not we are supporting the alsa sequencer]) ALSA_VERSION=$( pkg-config --modversion alsa ) AC_DEFINE_UNQUOTED(ALSA_VERSION, "$ALSA_VERSION", [The version of alsa we're compiling against]) fi else ALSA_FOUND="no" fi AM_CONDITIONAL(HAVE_ALSA, test "$ALSA_FOUND" = "yes") ############## ### GTK+ 2 ### ############## PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.12.0, true, AC_MSG_ERROR([you need gtk+ >= 2.12.0 see http://www.gtk.org/])) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) ############### ### GNOME 2 ### ############### jr_enable_gnome="yes" AC_ARG_ENABLE(gnome, [ --disable-gnome disable GNOME 2 support],[ case "$enableval" in "yes") ;; "no") jr_enable_gnome="no" ;; *) AC_MSG_ERROR([must use --enable-gnome(=yes/no) or --disable-gnome]) ;; esac ]) if test "$jr_enable_gnome" = "yes"; then PKG_CHECK_MODULES(GNOMEUI, libgnomeui-2.0, GNOME_FOUND="yes", GNOME_FOUND="no") if test "$GNOME_FOUND" = "yes"; then AC_DEFINE(HAVE_GNOME, 1, [whether or not we are supporting gnome]) GNOME_VERSION=$( pkg-config --modversion libgnomeui-2.0 ) AC_DEFINE_UNQUOTED(GNOME_VERSION, "$GNOME_VERSION", [The version of gnome we're compiling against]) AC_SUBST(GNOMEUI_CFLAGS) AC_SUBST(GNOMEUI_LIBS) fi else GNOME_FOUND="no" fi AM_CONDITIONAL(HAVE_GNOME, test "$GNOME_FOUND" = "yes") ############### ### libxml2 ### ############### jr_enable_xml="yes" AC_ARG_ENABLE(xml, [ --disable-xml disable libxml2 support (this is required for saving/loading files)],[ case "$enableval" in "yes") ;; "no") jr_enable_xml="no" ;; *) AC_MSG_ERROR([must use --enable-xml(=yes/no) or --disable-xml]) ;; esac ]) if test "$jr_enable_xml" = "yes"; then PKG_CHECK_MODULES(XML, libxml-2.0, XML_FOUND="yes", XML_FOUND="no") if test "$XML_FOUND" = "yes"; then AC_DEFINE(HAVE_XML, 1, [whether or not we are have xml support]) XML_VERSION=$( pkg-config --modversion libxml-2.0 ) AC_DEFINE_UNQUOTED(XML_VERSION, "$XML_VERSION", [The version of libxml2 we're compiling against]) AC_SUBST(XML_CFLAGS) AC_SUBST(XML_LIBS) fi else XML_FOUND="no" fi AM_CONDITIONAL(HAVE_XML, test "$XML_FOUND" = "yes") ############## ### LASH ### ############## if test x$XML_FOUND = xyes; then jr_enable_lash="no" AC_ARG_ENABLE(lash, [ --disable-lash disable LASH support],[ case "$enableval" in "yes") jr_enable_lash="yes" ;; "no") jr_enable_lash="no" ;; *) AC_MSG_ERROR([must use --enable-lash(=yes/no) or --disable-lash]) ;; esac ]) if test "$jr_enable_lash" = "yes"; then PKG_CHECK_MODULES(LASH, lash-1.0 >= 0.5.0, LASH_FOUND="yes", LASH_FOUND="no") if test "$LASH_FOUND" = "yes"; then AC_DEFINE(HAVE_LASH, 1, [whether or not we are supporting lash]) LASH_VERSION=$( pkg-config --modversion lash-1.0 ) AC_DEFINE_UNQUOTED(LASH_VERSION, "$LASH_VERSION", [The version of lash we're compiling against]) AC_SUBST(LASH_CFLAGS) AC_SUBST(LASH_LIBS) fi else AC_MSG_WARN([LASH support is disabled]) LASH_FOUND="no" fi else LASH_FOUND="no" fi AM_CONDITIONAL(HAVE_LASH, test "$LASH_FOUND" = "yes") ############ ### lrdf ### ############ jr_enable_lrdf="yes" AC_ARG_ENABLE(lrdf, [ --disable-lrdf disable lrdf (XML LADSPA description) support],[ case "$enableval" in "yes") ;; "no") jr_enable_lrdf="no" ;; *) AC_MSG_ERROR([must use --enable-lrdf(=yes/no) or --disable-lrdf]) ;; esac ]) if test x"$jr_enable_lrdf" = x"yes"; then AC_CHECK_HEADER(lrdf.h, AC_CHECK_LIB(lrdf, lrdf_init, LRDF_FOUND="yes", LRDF_FOUND="no"), LRDF_FOUND="no") else AC_MSG_WARN([lrdf support is disabled]) LRDF_FOUND="no" fi if test x$LRDF_FOUND = xyes; then AC_DEFINE(HAVE_LRDF, 1, "whether or not lrdf support is enabled") LRDF_CFLAGS="" LRDF_LIBS="-llrdf" AC_SUBST(LRDF_CFLAGS) AC_SUBST(LRDF_LIBS) fi AM_CONDITIONAL(HAVE_LRDF, test "$LRDF_FOUND" = "yes") ############### ### gettext ### ############### AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.14.5]) AC_OUTPUT([ po/Makefile.in Makefile src/Makefile pixmaps/Makefile ]) AC_MSG_RESULT([ JACK Rack configured ALSA support: $ALSA_FOUND XML support: $XML_FOUND LRDF support: $LRDF_FOUND LASH support: $LASH_FOUND GNOME 2 support: $GNOME_FOUND JACK Session support: $JACK_SESSION_FOUND Installation prefix: $prefix ]) jack-rack-f9fb65d/ecarack000077500000000000000000000040261151220453700153700ustar00rootroot00000000000000#!/usr/bin/python # ecarack: use ecasound to run a saved JACK Rack configuration. # This is rather simplistic: it only looks at plugin controls and the Enable # buttons, so MIDI controls, wet/dry settings and the like will be ignored. # Copyright (C) 2007 Adam Sampson # # 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. import sys, os, gzip, xml.dom.minidom def main(args): if len(args) != 1 or args[0] == "--help": print >>sys.stderr, "Usage: ecarack RACK-FILE" return 1 try: f = gzip.open(args[0], "r") except IOError, e: print >>sys.stderr, "Failed to open %s: %s" % (args[0], e) return 1 try: dom = xml.dom.minidom.parse(f) except: print >>sys.stderr, "Failed to parse %s" % args[0] return 1 f.close() cmd = ["ecasound", "-i:jack_auto", "-o:jack_auto"] def get(node, tag): return node.getElementsByTagName(tag) def text(node): if node.nodeType == node.TEXT_NODE: return node.data else: return " ".join(map(text, node.childNodes)).strip() for plugin in get(dom, "plugin"): if text(get(plugin, "enabled")[0]) == "false": continue id = text(get(plugin, "id")[0]) controls = [text(get(n, "value")[0]) for n in get(plugin, "controlrow")] cmd.append("-eli:" + id + "".join(["," + v for v in controls])) print >>sys.stderr, "ecarack: running " + " ".join(cmd) os.execvp(cmd[0], cmd) return 1 if __name__ == "__main__": sys.exit(main(sys.argv[1:])) jack-rack-f9fb65d/jack-rack.desktop000066400000000000000000000003621151220453700172710ustar00rootroot00000000000000[Desktop Entry] Encoding=UTF-8 Name=JACK Rack Comment=Stereo LADSPA effects rack Comment[ru]=Стойка эффектов LADSPA Exec=jack-rack Icon=jack-rack-icon.png Terminal=false Type=Application Categories=GNOME;Application;AudioVideo; jack-rack-f9fb65d/pixmaps/000077500000000000000000000000001151220453700155305ustar00rootroot00000000000000jack-rack-f9fb65d/pixmaps/Makefile.am000066400000000000000000000005611151220453700175660ustar00rootroot00000000000000pkgdata_DATA = \ jr-cross.png \ jr-down-arrow.png \ jr-up-arrow.png \ jack-rack-logo.png \ gnome-mixer-small.png pixmapdir = $(datadir)/pixmaps pixmap_DATA = \ jack-rack-icon.png EXTRA_DIST = \ jr-cross.png \ jr-down-arrow.png \ jr-up-arrow.png \ jack-rack-logo.png \ jack-rack-logo.xcf \ jack-rack-icon.png \ jack-rack-icon.xcf \ gnome-mixer-small.png jack-rack-f9fb65d/pixmaps/gnome-mixer-small.png000066400000000000000000000010721151220453700215730ustar00rootroot00000000000000PNG  IHDR bKGD pHYs  d_tIME;\IDATxKHPLNPK 0 eѢ}b(ZԢ]AhH> 2% Ih|I2-*B-Å8|οa 1-·ބ"1]H$r2EЅ]A*،a7h<}eh@/aor5۷e공{g_w>q=؊nM ^oqEdS'JkkmmWw0@1EcF=^!2E EQ!?sp.\#:#b x&#433#58\.7 S2c%,p4=\nvx4=6Lfp_qCÖ$KaH:}sDt|А̭0>z|9./p k2bKp'ZCV,X3ըX—Y?bsFIENDB`jack-rack-f9fb65d/pixmaps/jack-rack-icon.png000066400000000000000000000035531151220453700210200ustar00rootroot00000000000000PNG  IHDR00WbKGDLLLbw( pHYs  ~tIME(/IDATxX;oM=]m T4:h J $*G  `ّƏ}|E7O|%+̹X+[Vle_Çvww?~e )%ָt޾} $ I} c ʲBAyR(J)c;L!P%@YPJ_R"2&A$4M;k*DQwCV<ϙ2UUib8"cfJPyjX.s^I_nSZ,Kfeۈhv{q_* " ЕYDWγ,DtCl !Ȣ(yf,>ԢCJpGs! CdYV{֕!y-nm'ѳs0(B׃1߿g WUU\nv?N;;;t:0ưɹVur 4AwʅCiʠZ)ʲ~m~QRakk n'H)yӍF[>NTi!%5U c fY:2'|Yaac{{ThP$ 'V^S4\Z|;1N 9NdQ(JHvш&Q'(c|G' 8dd pU~^)p)ijgx0 FѨ'ƉxO>ǏHӔVv͍0iߤ>Ar{5||$Ipxxfx 8x%a7o0K{ Qd/bmm;k9t$Ibl4MYZ'uk-kCbf MՃ<c:֒ҝuHnnuz ZĢ(nMΏ4M18-MryTɲ,K4Zv͋Ij9B}Y8b3XX,N/.LS`6aXp$咉TSwLH(BeQjоTJ' 7=5J)t]lmm62˗/mYv888`'鞪 I35>;(Ĭ( R}Kϟ?& [*)m@kInn}C۷osq8Vle+[d-PMs6IENDB`jack-rack-f9fb65d/pixmaps/jack-rack-icon.xcf000066400000000000000000000115041151220453700210070ustar00rootroot00000000000000gimp xcf file00BB/ gimp-commentCreated with The GIMP 00TextU     K00_00o   B } H  m d.U C s<2Jx}n L* , 92[ m\ S] g  00Plate     0000B󌺋≋׀亊~~~}蛝LL쪬ˮLLꗑӣAB󌺋≋׀亊~~~}蛝LL쪬ˮLLꗑӣAB󌺋≋׀亊~~~}蛝LL쪬ˮLLꗑӣAB+-,+B00 Background     g00{00    00Selection Mask copy0000&B+-,+Bjack-rack-f9fb65d/pixmaps/jack-rack-logo.png000066400000000000000000000351471151220453700210340ustar00rootroot00000000000000PNG  IHDRJ4vqbKGD pHYs  d_tIME' 7 IDATxKlYZȌ|DfDfU}K,EhAF'rAhZA38PG5*(RAM҈E7]eQvݮsdl7$cﵾ=cv%n8#"*JT*z8jT*L&J4j$}ڢ((t""o\T""R$j:GZ&I#"V(~yNZUСx1K>AFM;IRj~95K}~Ɏ4Ȼt(;~^CDyIFZ^]'rHw zUe9!>x66(?+ҦhKOC qulGџh4g)}_W?v|p{:~`@#BRU0TĵRj(k^Ox `BUg %Qdn$9ʩ>/'IǢ1ҠIک%`& 4`<č[hXLO둜^"z 0 9#:ȉb]4a(MTt2\ 0 &ATψAtal9>I:ч/b۔G{F#ɜr\\6Q99{.SDe]ԽFG:H3uΝ16F}qdouEFd3,A^00uſpXm&]XXXH."p8>ߋJ4`0mgfZh6 ''gDnhi:RW@zXF8mHl*2F=qq1aD>y_:sAӱ-3YrV1}=R ox MF=hEyKoI҉c"4\=:HN85K2$At% /~Eȼjz\8766^vo~_Èۓ7hooo@Co{zzVk$9N dͶ>Ft̿dxr

^'N䇃~gdr<9V(#A:=,B6 >':\ s2Ȗt\q"N'Krp}X^^>|k|2^q"GQ,xk _hݐ%tc'8WC.:j3 iyZ-Q5Eg$4IAsI9~8nFZ@@vO"Zh4*Mq 8t^bMsmԳ </EM"ͺ ^86٨gU^ޣEsѬw.Qz=:~ޛ}$<֩lTzY`3HAB<}g^o28I+ =$Z ٗpiT$:u6F&EU-z)gΈ{:,Zhi9/\.ZS񜃤SHM}{tQDMeO9Is.W򊳶9m?wӃӗdyNAr #_OZ+++fdy͗pjl6KJCBcOf$1 ن/WRϽ4vR8VV*&&Ij=dRQ@tk6[i8...JtPm43kV )wfFZfR( (<Ӑ.9d<߸>R]]M9$jZjmH0G3j?$hnQr9??ǡ{JrO-,sp8#:w_(sssIWWW;;;q~~O8;;+K}/z)ťX4+#xYkIr<+>}GGG%+EDy<{,xl&QTˈKC0?~RO>M:QSG2~':C-E'''6ʾHd2Ie ƌA|_OmM;G)HD yLv ] %lzsD+e*0ɓ'/~1k@xgiW`Es\-...бpXaRhAlooaI~WOru2#As& j'3B4*~ƛoYňH\ɜYcM Qv`3 }|0??_;iO$Z4h eωV){Fc9>>8==-2Ǩ{c$R[ H)JŽWO]\\<7M^ifjƻ ("Z3yHznFK )=F^k[DA1N&xy^"_}ix(Rן,ҁT՘KOz^$w.,䙎A0qԡ4->vvvbss[}SBw@9:88;w WVgϞe4K[CQjd24ꛎ0XRVWmN??> ޟ韖xl:_T*/4+Td& 1 P5,.3 #exJBj1t:>yxA0%۱z}&&`~T15^'(naa!c:&$( 0boo/=ONo(m<@E\nkg]ѾQM-"~%~Ձٗyݻv6i48::)=uZyWA4.2 l~Zie{ H `DK''36RD )4A% a)-fr_o-:bmm-?3MRZyttN')/OJQt.Z\ZZ{bi]#ѫGZՊV)zTۚwťbyɌcȖ%_BE?s?]Q@uF8<J8؈Of@EU X^^.9sFW;;;2J%ZV̄GN˘vv9,訄ez tSh4J.1Av'D\yl5*+uzzZ>2 [ܔR(""4)Dm+`0_Rq677cqq1҄8vwwnIT~ĿJv;z뭙C$< QB:- d:qyy9T\T}F,//u+hYYŋ!jKbAfZ[-zXZZ*[eV&`xA)" Ƨ il6caa!bee%Us||\Taͤz=xnH4& ~H "~wDznK[ћ'2:As ӥN^#"VWW˴GkЋծ8T~ ٣X\\xL֭[%JquGݻw/"Oq\%oYf8;;+sWшNvTߧ}\t^E "Ol(P#èKJ^۟QG5z\@'c[5V('In|g$F;bww7nݺhb Le4(_AkTFw**sr#sX;Nlnn'Kx˗c^HͨZ|HoE 4"@' i=yE]YY>,]{2e+;Ul4E/f{Rse(478n7閮RPD̬p`wu_ږF^Irơy:p$Z}:󨬬WRt5vJ%Sͺ caaƙt^/n߾]R<ѫ|1ZfFJI^~Q@e՚w:ccc#]\tSMQ; w3dG*PG L&׏qQ(הfh4bnn.-q@_mӴ ܹSDEj%'ʕ<z>C{ccc#Es:ls:/e,//21@ z_WTj<|6;g =4wcWth\v2FԢlFVKhQnd&j}GGG3O.RiYKh\t:|(ʘ(Ori^zsssn*=uĈ)i "yX -cg&VhEu⃏2tzi k@;;;%$y"$-cZRf>0QٖK&Ii‘V2(1N'm.;PfOy|"eΠKt| CQ"5Έ9@xUй#G~I\ 6Wڳ|h_;3CۍgϞRgt/ =SŲ#<&} P#y뱶c iy@:s0Ket ^"j6w𼖯:Ĉjz0u4JAyly@Ut3+bي٪űO-ʦlFӉ279BfK|(S mJ%ƪ^_Qq?J:6H3tIјa]0MG94t:JBZo20TR Z&_87V+e\M&h6v햢;//^e9'\$drÓ'OJ/.Hfi`s~pp0Л0cqqN[FJ*JEM}[%!V5 k,6:XpVncmm-J t-/FS]&I,//E>N0D$WS ] j>h7pw!cu~i{fYZvxim s0h4Jz'tz]9O'??_ YЬ;K!(NNNfZ>a{7lSS9ݎrkM F+J J#U#؈J%Mh x k,^a.бggghCm$)뉁= QJxSyQm8s`?b7kBjÕ$9 11-uiI @ʁ٣,bkk+@xH/g%}R&W4[;+HaJ3"Rqx(jrȥtnܮL2-HQIv^s& J'5բaʹRӧOӚ?ʏKWXPu`h4^KQ-i:>>.F\[J#NV&ehj $#uiaaa& @JcV4uͣɈeNl_h G#׹Zw:$pxԑ~27] r(^- ϟ?ٮX^^.S|֭xy)uzϨ\P\yN 1Fv&P xqq~a۷ă;H\ty O`_|7"E%kKz,󪈜^=5C>0bi4l6S}RHVVVJ8JϋHrR]ABp~D~z///g?gwF\l_'lkAˋ(wc0( {漢hjqvv6S+)27h礕{a=0#y7m5b?niɒ3p]IDAThlTJ'٦|?dֲݺu?'I$ͨ*9%2b:ŋN=+Y^oN'9K%&$D%]PKtbggg@Ys}FtXDoM fk V^Ϋupp+++VzKC^{.BG쑰u5 ϟ:UNu̓ 3-NޣZɧg8~o4̓ҵXXX(-p;;;KSaHIZpN񩁜$QqXEtR8o^X|?y$v's6׮qүnT!_==gM(lllD-e&k=ţԟġxVQ?Rй4=٣~"#%E4o*Gil]^ PD$]yB-Έ|R |`.'/ FQ%8`s( f" Lh<~'# =KJsfxYDJqΝAī,nx]<|; ȝџxLY0`: \ܺu+666J4z8Ƭ2w(=sx?^t{ji /nV? :NZSI8z{nɩNͱGD YKdɫ Jju H{V*\.oKuk]ͬ9NM0}&d;]SnD#rʬs\0q Rx JӦVWWKPTbii)^x13~EzFrZ˱ ttDF|d Aev-شngA"\ Dg,{ /,sٙ"f*u7ѫ CgtREEvUd-cw D @ *zjT'"EL&jfxJ\>!`P݇鳧p888H5nllD(_!ٲޘܑ01zT:8[|:;;O?4?~kkkKKK=w*颱5n[zMg4J>wwwcaaTFVi.e>~%yHElR(Jo,h_r%P:(]L0wvvboo/֢餉%:8WN_ V%7nߝֈ~2rf1B1 A zuEO>Ev`T_@oRVgz>>܌Nz}fIt:-=VLi=d="t:i9.k."666b{{{|U۷K1tMjCNK9|#_x/_VubZFuL:#>(x{QQ1 Õ7U}+.#둗pɒR}RQ~͹Wף)7m4suuF#}+Wގ۷oGј($ߜr1QqY׵4 )\ܾ};g,ɥX$9zsQ3i0>~HUh۱UZ֢Uu___OY|Ė]YYI;qR$f^JvwwSd i{n۞2x swΑ .GE~?zD)mzeODG.;hS,iHWWW3OVOjCsrRC{Iz t:M;0򈸮nQ?LJO50)"Kooo?DZ6W%_yGS?S3zJo9y`pR_1jӡ ǝ;w/eܙEs4k^z0V[o_u_\,g-;99^Wz8=H_K{0Qth~~>ZVIVy||%[[[K@)IfǏ _B)T8)EܔL9n&RYF\g>|8:[hDdm/.`4HQ)GQHG8O4=H"'I # 2R߿?E$U[dvij7B)3/g41_knܿ? ئ'O(90??_ZCJ?Lҫ!TI>7R^Lύ*b|,Stf3>.Pcӽc9fp46uQl73GZ-oEoL>m9? ?Q"QZ{֢^'P 3A*"Q.F89NEv==;;h6QEܹs'~m$tJtt Nxw;W\)M&.͈\(}℆)#`ck )xRZy܌ۋZEG(XxSdiO qU Zޘdwww2AlzSKQgJY&sv[o-0Cf3.^GGG;ժ:Qǣ~ ע(fJs*x#/ĿdYz??ǯ _"711'ԷyUxA:Tu&bEgә1ƈrJNEz~xxvsN3N."V ߴK\ú 4K4=G4Z9fզsfY㤓ar]W؈~J@r~SpzzZ[ND̼=q<^_ZXXz^zejv2zDl3~T{?2??f3jl Q{KOE16bxM#`}+wwK}/~g6Us#")b}Ӆ:BE졁)q%:7(mO&)n,0"TIQkIPz|O"ЩmJcF[Ѱz]V$녅{nlmmIe| @ā+E3O?KKK;nvvv,iyAV7'MXwN͟t^[[[%)">|}ь/ P$ 6 #6NO_ /VTnN'bgg'E;Rh#9r%A-Ev>"RYexz=ݻJHJݎG*b/ۥr&t^+[V&/-/'|2B.G^#Xi=%f[[[qqqǩl!F dCՊ__I%PGww霈/4cSdb <c?yzz&2Pj̼BmT\i8ujUu-^Еjovr6v, >L`3o"H ~9JA೅A!};>LΕ;+e@#"3^RMKzq޽ԦJzw)3 UZA%+\5\/(=ED*( qvv6}qg7zL3FZictrQ3G}!ݨ7Z-*73a3;ұAf~zL+m{3UpH= $Ӓma;,hyI*!/8nޔN#ܑG*9?ٍ4E$ʁu"8'/Q},I9i:pxͶ9M9 fHz䟫9=RMZMy=Nڕ i' }wc󢰌KDvծRʰp\<"f'u1Ԋ(|9#h ]*S0 dATX.;}؏{x)?B}Tՙ}5i9'΀P9mrDt.-8 1yڝ 6rO΃AAxYyF%-SNQַju9(9.`^5 ͰCZ]n^3Au/>^ &3uq\s+'O>f߹D0Eѐ\N?9u3"xC)TOΎx;ˎD7olO}$S^\PGsɟJCCӑ @WVV+W?͓&!y[ -' \¨֣(9и(tp| l^I? ng(Gzow"El9>\sLwRޏ@e_iR\|< ]if;|ҭkIay4Y{V7zlʁWNAs)A(}i dz#WN~ W4Prρ+ s)S[ӫR>#su97!ٍrT^md7n/xA\>aΉP9pu0"s%*<sL.Un >njܲ$fO6677_q^(_~kxo&rB)m" «?}V͎ױu til1>+^Qcz㑑[2e8?M t>7G<90tJ?Yvi|?RIcHLDG@ 1ؠOHL yKYIv;unq@a ߆avl^޺u~~}{'ɗgtinb{VgWX̕p=2;BWqW0  ʂty^PRe}gzPR)X   X ~-[\X +>XqX.]]X23X X0YX9X X1Q X?EXtX2GXF YX X 3:XM gX  WX 4,j,XT },X -,X5L,XpF,X,X6&~,N   (%lј> tF|M ! U$6&a ()+ U- /I#mt%f<'(Q'D$Tx"E k x E !y#F&y(s9H ]F !C DA ?  = ;     @ύ6hÀ/s{   &  b & +  . e  7 c9M NwB$>)  %~-[\oI+>Zqf.]]J23 0YJ9 Ӕ< 1Q F?E= ts 2GD?F Y{ 9 3: 7M g   W 4,j+T } i| -+5LP[pFt՘i 6&~   (,J,, Q, $,Y,+ , a 3 X !#K%w(?+ k- 30^ 2&545g 2 40 h -5+i(6&i#6! *,(} ,&{ ,$y, "v, t,r,R )J4Screws     uJ4&J4 c:cc9cc:ccc9cc=ccc9cc9cc<cc:cc9cc:ccc9cc=ccc9cc9cc<cc:cc9cc:ccc9cc=ccc9cc9cc<c;::;;::;                gccccccccccccccccccggccccccccccccccccccggccccccccccccccccccgfgR )J4Plate     J4J4?pgm[gű껽⸷һ붵ɼ۾ѿ磌໽̰ɨ¾罿ܺﵶ᷹繺񭮮ܺа¦¾淺Լ丷쨩ӳå砢鷵Ӧ뱯㼣󶷹槢꭯੪񬫭򻹸백鴳𮫪䲳Dz보湧񩮰붷󭮭䫬򥦧寭Φܧࢤﭬ󮰯򧨬Ԭ򧦨寬𳱯㪭񣤢㯱颤𩫪룢埜ʮꛝɸ󦨨õ񤣣񟠞ǫР˸좣ű껽⸷һ붵ɼ۾ѿ磌໽̰ɨ¾罿ܺﵶ᷹繺񭮮ܺа¦¾淺Լ丷쨩ӳå砢鷵Ӧ뱯㼣󶷹槢꭯੪񬫭򻹸백鴳𮫪䲳Dz보湧񩮰붷󭮭䫬򥦧寭Φܧࢤﭬ󮰯򧨬Ԭ򧦨寬𳱯㪭񣤢㯱颤𩫪룢埜ʮꛝɸ󦨨õ񤣣񟠞ǫР˸좣ű껽⸷һ붵ɼ۾ѿ磌໽̰ɨ¾罿ܺﵶ᷹繺񭮮ܺа¦¾淺Լ丷쨩ӳå砢鷵Ӧ뱯㼣󶷹槢꭯੪񬫭򻹸백鴳𮫪䲳Dz보湧񩮰붷󭮭䫬򥦧寭Φܧࢤﭬ󮰯򧨬Ԭ򧦨寬𳱯㪭񣤢㯱颤𩫪룢埜ʮꛝɸ󦨨õ񤣣񟠞ǫР˸좣7T7g89j:T; <T;j:9g8T7¿ÿ佼꺾Ҿ𻾽¾󼾾蹵쵶ܻ¿¿븾㾼¿ຼ纸½𾽽߽侼߻꼻𺻺򻽿ڿ󽻻޹񸺻亻򻼽ط纹췴ֺ궷뼾ݸ伻Ỹٴ⽼۶軸س涵׶󸺹߶벳纻󩪪Ƴ񯰰ίٵꪫ豰Ԫ祤汯񤦥ᰯשׂĦ直¿ÿ佼꺾Ҿ𻾽¾󼾾蹵쵶ܻ¿¿븾㾼¿ຼ纸½𾽽߽侼߻꼻𺻺򻽿ڿ󽻻޹񸺻亻򻼽ط纹췴ֺ궷뼾ݸ伻Ỹٴ⽼۶軸س涵׶󸺹߶벳纻󩪪Ƴ񯰰ίٵꪫ豰Ԫ祤汯񤦥ᰯשׂĦ直¿ÿ佼꺾Ҿ𻾽¾󼾾蹵쵶ܻ¿¿븾㾼¿ຼ纸½𾽽߽侼߻꼻𺻺򻽿ڿ󽻻޹񸺻亻򻼽ط纹췴ֺ궷뼾ݸ伻Ỹٴ⽼۶軸س涵׶󸺹߶벳纻󩪪Ƴ񯰰ίٵꪫ豰Ԫ祤汯񤦥ᰯשׂĦ直 縵ު௮ݢ᫭շᤥ嬫˱𲳰涴צ걲՟ꫬ򻺺ڳ۳羻٬ﳱ뻺ϸݹ溼ﯮ𶷶󫯰⺹㽼мڼ˲궷ػո䶹װͯʻ渹߳񺶶򱶷򹸷涾༸ȷﰻ״󶵵߻ζܱ濼ﮰ񮰱񲰮벳㲳𱲱ݬ𬭯뭮縵ު௮ݢ᫭շᤥ嬫˱𲳰涴צ걲՟ꫬ򻺺ڳ۳羻٬ﳱ뻺ϸݹ溼ﯮ𶷶󫯰⺹㽼мڼ˲궷ػո䶹װͯʻ渹߳񺶶򱶷򹸷涾༸ȷﰻ״󶵵߻ζܱ濼ﮰ񮰱񲰮벳㲳𱲱ݬ𬭯뭮縵ު௮ݢ᫭շᤥ嬫˱𲳰涴צ걲՟ꫬ򻺺ڳ۳羻٬ﳱ뻺ϸݹ溼ﯮ𶷶󫯰⺹㽼мڼ˲궷ػո䶹װͯʻ渹߳񺶶򱶷򹸷涾༸ȷﰻ״󶵵߻ζܱ濼ﮰ񮰱񲰮벳㲳𱲱ݬ𬭯뭮 𢤥񙘘ڞ옖Ș򜙚󗔑˟𥤠ݙ񢣣𖘖㣟ϙ환󧥥ޝ᠟򢤢ܚ񥣤⣠ї旛룢蠞硟훞󣤢쟞񩪨뛜闙⤣򯭮򤢢梠ݦ갮ڢ؝ʬ릥̮񣡠ܯ쮱̦ߥ⧨殰񦧥𬭫䣥󦤥ӥꨧ̵򦥦嶴娧󪫯֢歮鯰䧦שׂ𢤥񙘘ڞ옖Ș򜙚󗔑˟𥤠ݙ񢣣𖘖㣟ϙ환󧥥ޝ᠟򢤢ܚ񥣤⣠ї旛룢蠞硟훞󣤢쟞񩪨뛜闙⤣򯭮򤢢梠ݦ갮ڢ؝ʬ릥̮񣡠ܯ쮱̦ߥ⧨殰񦧥𬭫䣥󦤥ӥꨧ̵򦥦嶴娧󪫯֢歮鯰䧦שׂ𢤥񙘘ڞ옖Ș򜙚󗔑˟𥤠ݙ񢣣𖘖㣟ϙ환󧥥ޝ᠟򢤢ܚ񥣤⣠ї旛룢蠞硟훞󣤢쟞񩪨뛜闙⤣򯭮򤢢梠ݦ갮ڢ؝ʬ릥̮񣡠ܯ쮱̦ߥ⧨殰񦧥𬭫䣥󦤥ӥꨧ̵򦥦嶴娧󪫯֢歮鯰䧦שׂ ᓒ򕔔𐓔뙛ז曙蓑Ȗ𗘙얔򐏎Վ򒔓쏎򎐏󒑓؎𐏎򍉢폎󏋌܌ؐŎދ鑐Սۑ䓔񎏑򎌍ØΕ푐𖘙ߔ󕗖옙ꑓ󗕢៞𕓔ޚ𔒑♛얗񜙚֟៝ߘ엖줡񞚙癘왘痖뙘񙘙ƞ̕ˢ🠠٠󠟟آ򧥦Ѣ󦤤럜򧦦ץ騪𧥤ާ򪨦⨧󦧨篮ᓒ򕔔𐓔뙛ז曙蓑Ȗ𗘙얔򐏎Վ򒔓쏎򎐏󒑓؎𐏎򍉢폎󏋌܌ؐŎދ鑐Սۑ䓔񎏑򎌍ØΕ푐𖘙ߔ󕗖옙ꑓ󗕢៞𕓔ޚ𔒑♛얗񜙚֟៝ߘ엖줡񞚙癘왘痖뙘񙘙ƞ̕ˢ🠠٠󠟟آ򧥦Ѣ󦤤럜򧦦ץ騪𧥤ާ򪨦⨧󦧨篮ᓒ򕔔𐓔뙛ז曙蓑Ȗ𗘙얔򐏎Վ򒔓쏎򎐏󒑓؎𐏎򍉢폎󏋌܌ؐŎދ鑐Սۑ䓔񎏑򎌍ØΕ푐𖘙ߔ󕗖옙ꑓ󗕢៞𕓔ޚ𔒑♛얗񜙚֟៝ߘ엖줡񞚙癘왘痖뙘񙘙ƞ̕ˢ🠠٠󠟟آ򧥦Ѣ󦤤럜򧦦ץ騪𧥤ާ򪨦⨧󦧨篮 БƐۉ󏎉ʍ딑󕔔뚝ΡϩБƐۉ󏎉ʍ딑󕔔뚝ΡϩБƐۉ󏎉ʍ딑󕔔뚝ΡϩTgjTTjgTR )J4Selection Mask copyJ4J4>BFJN7 .7:7S8 <:.: ;.: <:S8:7 .7    . :S< ..< S:. R )jack-rack-f9fb65d/pixmaps/jr-cross.png000066400000000000000000000002251151220453700177770ustar00rootroot00000000000000PNG  IHDRRWbKGD pHYs  ~tIME ((4"IDATxc```π`pDX IPIENDB`jack-rack-f9fb65d/pixmaps/jr-cross.xpm000066400000000000000000000003251151220453700200200ustar00rootroot00000000000000/* XPM */ static char *jr-cross.png[] = { /* columns rows colors chars-per-pixel */ "7 7 2 1", " c opaque", ". c None", /* pixels */ " ..... ", ". ... .", ".. . ..", "... ...", ".. . ..", ". ... .", " ..... " }; jack-rack-f9fb65d/pixmaps/jr-down-arrow.png000066400000000000000000000002151151220453700207440ustar00rootroot00000000000000PNG  IHDRRWbKGD pHYs  ~tIME '!ᘐIDATxc`'$C\guVIENDB`jack-rack-f9fb65d/pixmaps/jr-down-arrow.xpm000066400000000000000000000003321151220453700207640ustar00rootroot00000000000000/* XPM */ static char *jr-down-arrow.png[] = { /* columns rows colors chars-per-pixel */ "7 7 2 1", " c opaque", ". c None", /* pixels */ ".......", ".......", " ..... ", ". ... .", ".. . ..", "... ...", "......." }; jack-rack-f9fb65d/pixmaps/jr-up-arrow.png000066400000000000000000000002151151220453700204210ustar00rootroot00000000000000PNG  IHDRRWbKGD pHYs  ~tIME '=NTIDATxc` '$]?. Vm$˥IENDB`jack-rack-f9fb65d/pixmaps/jr-up-arrow.xpm000066400000000000000000000003301151220453700204370ustar00rootroot00000000000000/* XPM */ static char *jr-up-arrow.png[] = { /* columns rows colors chars-per-pixel */ "7 7 2 1", " c opaque", ". c None", /* pixels */ ".......", "... ...", ".. . ..", ". ... .", " ..... ", ".......", "......." }; jack-rack-f9fb65d/po/000077500000000000000000000000001151220453700144655ustar00rootroot00000000000000jack-rack-f9fb65d/po/ChangeLog000066400000000000000000000035001151220453700162350ustar00rootroot000000000000002006-11-10 gettextize * Makefile.in.in: New file, from gettext-0.14.5. * Rules-quot: New file, from gettext-0.14.5. * boldquot.sed: New file, from gettext-0.14.5. * en@boldquot.header: New file, from gettext-0.14.5. * en@quot.header: New file, from gettext-0.14.5. * insert-header.sin: New file, from gettext-0.14.5. * quot.sed: New file, from gettext-0.14.5. * remove-potcdate.sin: New file, from gettext-0.14.5. 2005-06-01 gettextize * Makefile.in.in: New file, from gettext-0.14.4. * Rules-quot: New file, from gettext-0.14.4. * boldquot.sed: New file, from gettext-0.14.4. * en@boldquot.header: New file, from gettext-0.14.4. * en@quot.header: New file, from gettext-0.14.4. * insert-header.sin: New file, from gettext-0.14.4. * quot.sed: New file, from gettext-0.14.4. * remove-potcdate.sin: New file, from gettext-0.14.4. 2005-06-01 gettextize * Rules-quot: New file, from gettext-0.14.4. * boldquot.sed: New file, from gettext-0.14.4. * en@boldquot.header: New file, from gettext-0.14.4. * en@quot.header: New file, from gettext-0.14.4. * insert-header.sin: New file, from gettext-0.14.4. * quot.sed: New file, from gettext-0.14.4. * remove-potcdate.sin: New file, from gettext-0.14.4. 2005-05-31 gettextize * Makefile.in.in: Upgrade to gettext-0.14.4. 2003-07-03 gettextize * Makefile.in.in: New file, from gettext-0.11.5. * boldquot.sed: New file, from gettext-0.11.5. * en@boldquot.header: New file, from gettext-0.11.5. * en@quot.header: New file, from gettext-0.11.5. * insert-header.sin: New file, from gettext-0.11.5. * quot.sed: New file, from gettext-0.11.5. * remove-potcdate.sin: New file, from gettext-0.11.5. * Rules-quot: New file, from gettext-0.11.5. jack-rack-f9fb65d/po/LINGUAS000066400000000000000000000000141151220453700155050ustar00rootroot00000000000000ru fr de cs jack-rack-f9fb65d/po/Makevars000066400000000000000000000020751151220453700161650ustar00rootroot00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Robert Ham MSGID_BUGS_ADDRESS = # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = jack-rack-f9fb65d/po/POTFILES.in000066400000000000000000000012611151220453700162420ustar00rootroot00000000000000src/ui.c src/plugin_mgr.c src/port_controls.c src/midi_control.c src/plugin_desc.c src/ui_callbacks.c src/control_callbacks.c src/file.c src/plugin_slot.c src/wet_dry_controls.c src/main.c src/midi.c src/process.c src/midi_window.c src/plugin_slot_callbacks.c src/jack_rack.c src/lock_free_fifo.c src/plugin_settings.c src/plugin.c src/ui.h src/plugin_mgr.h src/port_controls.h src/midi_control.h src/plugin_desc.h src/ui_callbacks.h src/control_callbacks.h src/file.h src/plugin_slot.h src/wet_dry_controls.h src/midi.h src/process.h src/midi_window.h src/plugin_slot_callbacks.h src/control_message.h src/jack_rack.h src/lock_free_fifo.h src/globals.h src/plugin_settings.h src/plugin.h jack-rack-f9fb65d/po/cs.po000066400000000000000000000324741151220453700154440ustar00rootroot00000000000000# Pavel, 2011. msgid "" msgstr "" "Project-Id-Version: jack-rack 1.4.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-01-09 00:06+0000\n" "PO-Revision-Date: 2011-01-07 12:10+0100\n" "Last-Translator: Pavel\n" "Language-Team: Czech \n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Country: GERMANY\n" "X-Generator: Lokalize 1.1\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #: src/ui.c:75 msgid "File" msgstr "Soubor" #: src/ui.c:79 msgid "Rack" msgstr "Přihrádka" #: src/ui.c:85 msgid "Help" msgstr "Nápověda" #: src/ui.c:127 msgid "Save project" msgstr "Uložit projekt" #: src/ui.c:157 src/ui.c:259 msgid "Channels" msgstr "Kanály" #: src/ui.c:164 msgid "MIDI Controls" msgstr "Ovládání MIDI" #: src/ui.c:176 msgid "About" msgstr "O programu JACK Rack" #: src/ui.c:249 msgid "Add a plugin" msgstr "Přidat přídavný modul" #: src/ui.c:260 msgid "Change the number of I/O channels the rack has" msgstr "Změnit počet vstupních/výstupních kanálů, které má přihrádka" #: src/ui.c:268 msgid "Clear the rack" msgstr "Vyprázdnit přihrádku" #: src/ui.c:274 msgid "Load a previously-saved rack configuration" msgstr "Nahrát předtím uložené nastavení přihrádky" #: src/ui.c:279 msgid "Save the rack configuration to the current file" msgstr "Uložit nastavení přihrádky do nynějšího souboru" #: src/ui.c:284 msgid "Save the rack configuration to a new file" msgstr "Uložit nastavení přihrádky do nového souboru" #: src/ui.c:295 msgid "Save the current LASH project" msgstr "Uložit nynější LASH projekt" #: src/ui.c:305 msgid "Quit JACK Rack" msgstr "Ukončit JACK Rack" #: src/ui.c:334 msgid "Add MIDI control" msgstr "Přidat ovládání MIDI" #: src/plugin_mgr.c:88 src/plugin.c:293 #, c-format msgid "%s: error opening shared object file '%s': %s\n" msgstr "%s: Chyba při otevírání souboru se sdíleným předmětem '%s': %s\n" #: src/plugin_mgr.c:102 #, c-format msgid "%s: error finding ladspa_descriptor symbol in object file '%s': %s\n" msgstr "" "%s: Chyba při hledání symbolu ladspa_descriptor v souboru s předmětem '%s': " "%s\n" #: src/plugin_mgr.c:133 #, c-format msgid "Plugin %ld exists in both '%s' and '%s'; using version in '%s'\n" msgstr "Přídavný modul %ld je jak v '%s' tak v '%s'; používá se verze v '%s'\n" #: src/plugin_mgr.c:146 #, c-format msgid "Loaded plugin '%s'" msgstr "Nahraný přídavný modul '%s'" #: src/plugin_mgr.c:152 #, c-format msgid "%s: error closing object file '%s': %s\n" msgstr "%s: Chyba při zavírání souboru s předmětem '%s': %s\n" #: src/plugin_mgr.c:198 src/plugin_mgr.c:615 #, c-format msgid "%s: error closing directory '%s': %s\n" msgstr "%s: Chyba při zavírání adresáře '%s': %s\n" #: src/plugin_mgr.c:248 msgid "" "No LADSPA plugins were found!\n" "\n" "Check your LADSPA_PATH environment variable." msgstr "" "Nebyly nalezeny žádné přídavné moduly LADSPA!\n" "\n" "Prověřte proměnnou cesty ve svém prostředí: LADSPA_PATH" #: src/plugin_mgr.c:333 msgid ", NOT RT" msgstr ", ŽÁDNÝ RT" #: src/plugin_mgr.c:336 #, c-format msgid ", %ld aux %s" msgstr ", %ld aux %s" #: src/plugin_mgr.c:338 msgid "in" msgstr "Vstup" #: src/plugin_mgr.c:338 msgid "out" msgstr "Výstup" #: src/plugin_mgr.c:345 msgid "ch" msgstr "k" #: src/plugin_mgr.c:542 msgid "Uncategorised" msgstr "Nezařazen" #: src/plugin_mgr.c:610 #, c-format msgid "Found LRDF description file '%s'" msgstr "Nalezen popisný soubor LRDF '%s'" #: src/plugin_mgr.c:650 #, c-format msgid "%s: could not parse LRDF file '%s'\n" msgstr "%s: Nepodařilo se zpracovat soubor LRDF '%s'\n" #: src/port_controls.c:274 src/wet_dry_controls.c:89 msgid "Lock" msgstr "Seskupit" #: src/port_controls.c:361 msgid "On" msgstr "Zapnuto" #: src/midi_control.c:280 msgid "Wet/dry" msgstr "Ostrý/Zkušební" #: src/midi_control.c:285 src/plugin_slot.c:412 msgid "Enable" msgstr "Povolit" #: src/ui_callbacks.c:59 #, c-format msgid "%s: no plugin description!\n" msgstr "%s: žádný popis přídavného modulu!\n" #: src/ui_callbacks.c:78 msgid "I/O Channels" msgstr "Vstupní/Výstupní kanály" #: src/ui_callbacks.c:91 msgid "" "Warning: changing the number of\n" "channels will clear the current rack" msgstr "" "Varování: při změně počtu kanálů\n" "dojde k vyprázdnění přihrádky" #: src/ui_callbacks.c:133 msgid "Open File" msgstr "Otevřít soubor" #: src/ui_callbacks.c:174 msgid "Save File" msgstr "Uložit soubor" #: src/ui_callbacks.c:259 msgid "A LADSPA effects rack for the JACK audio API" msgstr "Přihrádka s efekty LADSPA pro zvukový systém JACK" #: src/ui_callbacks.c:263 msgid "__TRANSLATOR_CREDITS" msgstr "Pavel Fric" #: src/ui_callbacks.c:333 #, c-format msgid "LASH server disconnected\n" msgstr "Server LASH odpojen\n" #: src/ui_callbacks.c:340 #, c-format msgid "Received LASH event of unknown type %d\n" msgstr "Přijata událost LASH neznámého typu %d\n" #: src/ui_callbacks.c:499 msgid "Connecting to JACK..." msgstr "Spojuje se s JACK..." #: src/ui_callbacks.c:503 msgid "Connecting to JACK server..." msgstr "Spojuje se se serverem JACK..." #: src/file.c:200 #, c-format msgid "Could not save file '%s'" msgstr "Nepodařilo se uložit soubor '%s'" #: src/file.c:236 #, c-format msgid "The file '%s' contains an unknown plugin with ID '%ld'; skipping" msgstr "" "Soubor '%s' obsahuje neznámý přídavný modul s identifikátorem (ID) '%ld'; " "přeskakuje se" #: src/file.c:463 #, c-format msgid "Could not parse file '%s'" msgstr "s: Nepodařilo se zpracovat soubor '%s'" #: src/file.c:469 #, c-format msgid "The file '%s' is not a JACK Rack settings file" msgstr "Soubor '%s' není souborem s nastavením pro program JACK Rack" #: src/file.c:483 msgid "" "The current rack will be cleared.\n" "\n" "Are you sure you want to continue?" msgstr "" "Nynější přihrádka bude vyprázdněna.\n" "\n" "Jste si jistý, že chcete pokračovat?" #: src/plugin_slot.c:300 msgid "Lock All" msgstr "Seskupit vše" #: src/plugin_slot.c:423 msgid "Wet/Dry" msgstr "Ostrý/Zkušební" #: src/wet_dry_controls.c:105 msgid "Channel" msgstr "Kanál" #: src/main.c:71 #, c-format msgid "Compiled with:\n" msgstr "Sestaveno s:\n" #: src/main.c:86 #, c-format msgid "Usage: jack-rack [OPTION]..." msgstr "Použití: jack-rack [VOLBA]..." #: src/main.c:93 msgid "Display this help info" msgstr "Zobrazit tuto nápovědu" #: src/main.c:95 msgid "Use the pid in the JACK client name (default)" msgstr "Použít PID v názvu klienta JACK (výchozí)" #: src/main.c:96 msgid "Use in the JACK client name" msgstr "Použít v názvu klienta JACK" #: src/main.c:97 msgid "Use just jack_rack as the client name" msgstr "Použít jack_rack jako název klienta JACK" #: src/main.c:99 msgid "Connected inputs to the first two physical capture ports" msgstr "Automaticky spojit vstupy" #: src/main.c:100 msgid "Connected outputs to the first two physical playback ports" msgstr "Automaticky spojit výstupy" #: src/main.c:101 msgid "How many input and output channels the rack should use (default: 2)" msgstr "Počet vstupů a výstupů, které má přihrádka používat (výchozí: 2)" #: src/main.c:197 #, c-format msgid "There must be at least one channel\n" msgstr "JACK Rack potřebuje alespoň jeden kanál\n" #: src/main.c:223 #, c-format msgid "Please specify only one file to open" msgstr "Určete, prosím, jen jeden soubor, který se má otevřít" #: src/midi.c:47 msgid "Connecting to ALSA sequencer" msgstr "Spojuje se se sekvencerem ALSA" #: src/midi.c:53 #, c-format msgid "" "Could not open ALSA sequencer, aborting:\n" "\n" "%s\n" "\n" "Please check that your ALSA configuration is correct." msgstr "" "Nepodařilo se otevřít sekvencer ALSA. Ruší se:\n" "\n" "%s\n" "\n" "Ověřte, prosím, že je vaše nastavení pro ALSA správné." #: src/midi.c:56 #, c-format msgid "Connected to ALSA sequencer with id %d" msgstr "Spojeno se sekvencerem ALSA s ID %d" #: src/midi.c:72 msgid "Creating ALSA sequencer port" msgstr "Vytváří se přípojka pro sekvencer ALSA" #: src/midi.c:80 #, c-format msgid "" "Could not create ALSA port, aborting:\n" "\n" "%s" msgstr "" "Nepodařilo se vytvořit přípojku ALSA. Ruší se:\n" "\n" "%s" #: src/midi.c:82 msgid "Created ALSA sequencer port" msgstr "Vytvořena přípojka pro sekvencer ALSA" #: src/midi.c:140 #, c-format msgid "%s: error sending MIDI event: %s\n" msgstr "%s: Chyba při posílání události MIDI: %s\n" #: src/midi.c:333 #, c-format msgid "%s: could not get scheduling parameters of JACK thread: %s\n" msgstr "%s: Nepodařilo se získat parametry rozvržení vlákna JACK: %s\n" #: src/midi.c:352 #, c-format msgid "%s: could not set SCHED_FIFO for MIDI thread: %s\n" msgstr "%s: Nepodařilo se nastavit SCHED_FIFO pro vlákno MIDI: %s\n" #: src/process.c:171 #, c-format msgid "%s: GUI FIFO is out of space\n" msgstr "%s: GUI FIFO nemá místo\n" #: src/process.c:226 #, c-format msgid "%s: no JACK buffer for input port %ld\n" msgstr "%s: Žádná vyrovnávací paměť JACK pro vstupní přípojku %ld\n" #: src/process.c:233 #, c-format msgid "%s: no JACK buffer for output port %ld\n" msgstr "%s: Žádná vyrovnávací paměť JACK pro výstupní přípojku %ld\n" #: src/process.c:425 #, c-format msgid "%s: no process_info from JACK!\n" msgstr "%s: Žádná informace o procesech (process_info) od JACK!\n" #: src/process.c:439 #, c-format msgid "%s: failed to get JACK ports, not processing\n" msgstr "%s: Nepodařilo se získat přípojky JACK, nezpracovává se\n" #: src/process.c:459 #, c-format msgid "Connecting to JACK server with client name '%s'" msgstr "Spojuje se se serverem JACK s názvem klienta '%s'" #: src/process.c:471 msgid "Connected to JACK server" msgstr "Spojeno se serverem JACK" #: src/process.c:512 #, c-format msgid "Connecting port '%s' with '%s'" msgstr "Spojuje se přípojka '%s' s '%s'" #: src/process.c:519 #, c-format msgid "%s: error connecting ports '%s' and '%s'\n" msgstr "%s: Chyba při spojování přípojek '%s' a '%s'\n" #: src/process.c:522 #, c-format msgid "Connected port '%s' with '%s'" msgstr "Přípojka '%s' spojena s '%s'" #: src/process.c:571 #, c-format msgid "Creating input port '%s'" msgstr "Vytváří se vstupní přípojka '%s'" #: src/process.c:576 #, c-format msgid "Creating output port '%s'" msgstr "Vytváří se výstupní přípojka '%s'" #: src/process.c:591 #, c-format msgid "%s: could not register port '%s'; aborting\n" msgstr "%s: Nepodařilo se zapsat přípojku '%s'. Ruší se\n" #: src/process.c:594 #, c-format msgid "Could not register JACK port '%s'; aborting" msgstr "Nepodařilo se zapsat přípojku JACK '%s'. Ruší se" #: src/midi_window.c:79 msgid "Plugin" msgstr "Přídavný modul" #: src/midi_window.c:84 msgid "Control" msgstr "Ovládání" #: src/midi_window.c:89 msgid "Index" msgstr "Rejstřík" #: src/midi_window.c:100 msgid "MIDI Channel" msgstr "Kanál MIDI" #: src/midi_window.c:110 msgid "MIDI Controller" msgstr "Ovladač MIDI" #: src/midi_window.c:120 msgid "Min Value" msgstr "Nejmenší hodnota" #: src/midi_window.c:130 msgid "Max Value" msgstr "Největší hodnota" #: src/midi_window.c:154 msgid "JACK Rack MIDI Controls" msgstr "Ovládání MIDI pro JACK Rack" #: src/jack_rack.c:75 #, c-format msgid "" "Plugin not RT capable\n" "\n" "The plugin '%s' does not describe itself as being capable of real-time " "operation. If you use it, you may experience drop-outs or unexpected " "disconnection from JACK.\n" "\n" "Are you sure you want to add this plugin?" msgstr "" "Přídavný modul nedokáže RT\n" "\n" "Přídavný modul '%s' sám sebe nepopisuje jako schopného provádění činnosti ve " "skutečném čase. Pokud jej použijete, můžete zakoušet výpadky nebo " "neočekávaná odpojení od serveru JACK.\n" "\n" "Jste si jistý tím, že chcete přidat tento přídavný modul?" #: src/jack_rack.c:95 #, c-format msgid "Error loading file plugin '%s' from file '%s'" msgstr "Chyba při nahrávání přídavného modulu '%s' ze souboru '%s'" #: src/plugin.c:308 #, c-format msgid "%s: error finding descriptor symbol in object file '%s': %s\n" msgstr "" "%s: Chyba při hledání popisného symbolu v souboru s předmětem '%s': %s\n" #: src/plugin.c:403 #, c-format msgid "Could not register jack port '%s'; aborting" msgstr "Nepodařilo se zapsat přípojku JACK '%s'. Ruší se" #: src/plugin.c:581 #, c-format msgid "%s: could not unregister jack port\n" msgstr "%s: Nepodařilo se zrušit zápis přípojky JACK\n" #: src/plugin.c:609 #, c-format msgid "%s: error closing shared object '%s': %s\n" msgstr "%s: Chyba při zavírání sdíleného předmětu '%s': %s\n" #~ msgid "Add a new plugin to the rack" #~ msgstr "Ein neues Plugin zum Rack hinzufügen" #~ msgid "Remove all the plugins from the rack" #~ msgstr "Alle Plugins aus dem Rack entfernen" #~ msgid "Open a rack configuration file" #~ msgstr "Rack-Konfiguration laden" #~ msgid "" #~ "Save the rack configuration to the same file it was saved in last time" #~ msgstr "" #~ "Speichert die Rack-Konfiguration in die selbe Datei, in der sie das " #~ "letzte Mal gespeichert wurde" #~ msgid "Save the rack configuration to a file" #~ msgstr "Rack-Konfiguration in eine Datei speichern" #~ msgid "Save the LASH project" #~ msgstr "LASH-Projekt speichern" #~ msgid "Exit the program" #~ msgstr "Das Programm verlassen" #~ msgid "Created %s port '%s'" #~ msgstr "%s Port '%s' erstellt" jack-rack-f9fb65d/po/de.po000066400000000000000000000257141151220453700154260ustar00rootroot00000000000000msgid "" msgstr "" "Project-Id-Version: jack-rack 1.4.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-01-09 00:06+0000\n" "PO-Revision-Date: 2007-01-25 16:00+0100\n" "Last-Translator: Sebastian Arnold \n" "Language-Team: Sebastian Arnold \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Country: GERMANY\n" #: src/ui.c:75 msgid "File" msgstr "Datei" #: src/ui.c:79 msgid "Rack" msgstr "Rack" #: src/ui.c:85 msgid "Help" msgstr "Hilfe" #: src/ui.c:127 msgid "Save project" msgstr "Projekt speichern" #: src/ui.c:157 src/ui.c:259 msgid "Channels" msgstr "Kanäle" #: src/ui.c:164 msgid "MIDI Controls" msgstr "MIDI-Steuerung" #: src/ui.c:176 msgid "About" msgstr "Über JACK Rack..." #: src/ui.c:249 msgid "Add a plugin" msgstr "Plugin hinzufügen" #: src/ui.c:260 msgid "Change the number of I/O channels the rack has" msgstr "Verändert die Anzahl der Ein/Ausgangskanäle des Racks" #: src/ui.c:268 msgid "Clear the rack" msgstr "Rack zurücksetzen" #: src/ui.c:274 msgid "Load a previously-saved rack configuration" msgstr "Eine gespeicherte Rack-Konfiguration laden" #: src/ui.c:279 msgid "Save the rack configuration to the current file" msgstr "Rack-Konfiguration in die aktive Datei speichern" #: src/ui.c:284 msgid "Save the rack configuration to a new file" msgstr "Speichere die Rack-Konfiguration in eine neue Datei" #: src/ui.c:295 msgid "Save the current LASH project" msgstr "Speichert das aktuelle LASH-Projekt" #: src/ui.c:305 msgid "Quit JACK Rack" msgstr "JACK Rack Beenden" #: src/ui.c:334 msgid "Add MIDI control" msgstr "MIDI-Steuerung hinzufügen" #: src/plugin_mgr.c:88 src/plugin.c:293 #, c-format msgid "%s: error opening shared object file '%s': %s\n" msgstr "" #: src/plugin_mgr.c:102 #, c-format msgid "%s: error finding ladspa_descriptor symbol in object file '%s': %s\n" msgstr "" #: src/plugin_mgr.c:133 #, c-format msgid "Plugin %ld exists in both '%s' and '%s'; using version in '%s'\n" msgstr "" #: src/plugin_mgr.c:146 #, fuzzy, c-format msgid "Loaded plugin '%s'" msgstr "Plugin hinzufügen" #: src/plugin_mgr.c:152 #, c-format msgid "%s: error closing object file '%s': %s\n" msgstr "" #: src/plugin_mgr.c:198 src/plugin_mgr.c:615 #, c-format msgid "%s: error closing directory '%s': %s\n" msgstr "" #: src/plugin_mgr.c:248 msgid "" "No LADSPA plugins were found!\n" "\n" "Check your LADSPA_PATH environment variable." msgstr "" #: src/plugin_mgr.c:333 msgid ", NOT RT" msgstr ", KEIN RT" #: src/plugin_mgr.c:336 #, c-format msgid ", %ld aux %s" msgstr "" #: src/plugin_mgr.c:338 msgid "in" msgstr "" #: src/plugin_mgr.c:338 #, fuzzy msgid "out" msgstr "Über JACK Rack..." #: src/plugin_mgr.c:345 msgid "ch" msgstr "ch" #: src/plugin_mgr.c:542 msgid "Uncategorised" msgstr "" #: src/plugin_mgr.c:610 #, c-format msgid "Found LRDF description file '%s'" msgstr "" #: src/plugin_mgr.c:650 #, fuzzy, c-format msgid "%s: could not parse LRDF file '%s'\n" msgstr "Konnte die Datei '%s' nicht auswerten" #: src/port_controls.c:274 src/wet_dry_controls.c:89 msgid "Lock" msgstr "Gruppe" #: src/port_controls.c:361 msgid "On" msgstr "Aktiv" #: src/midi_control.c:280 msgid "Wet/dry" msgstr "Wet/Dry" #: src/midi_control.c:285 src/plugin_slot.c:412 msgid "Enable" msgstr "Aktivieren" #: src/ui_callbacks.c:59 #, c-format msgid "%s: no plugin description!\n" msgstr "" #: src/ui_callbacks.c:78 msgid "I/O Channels" msgstr "Ein-/Ausgangskanäle" #: src/ui_callbacks.c:91 msgid "" "Warning: changing the number of\n" "channels will clear the current rack" msgstr "" "Achtung: beim Verändern der Anzahl\n" "der Kanäle wird das Rack zurückgesetzt" #: src/ui_callbacks.c:133 msgid "Open File" msgstr "Datei Öffnen" #: src/ui_callbacks.c:174 msgid "Save File" msgstr "Datei Speichern" #: src/ui_callbacks.c:259 msgid "A LADSPA effects rack for the JACK audio API" msgstr "Ein LADSPA-Effekt-Rack für das JACK Audiosystem" #: src/ui_callbacks.c:263 msgid "__TRANSLATOR_CREDITS" msgstr "Sebastian Arnold" #: src/ui_callbacks.c:333 #, c-format msgid "LASH server disconnected\n" msgstr "LASH Serververbindung getrennt\n" #: src/ui_callbacks.c:340 #, c-format msgid "Received LASH event of unknown type %d\n" msgstr "" #: src/ui_callbacks.c:499 msgid "Connecting to JACK..." msgstr "Verbinde mit JACK..." #: src/ui_callbacks.c:503 #, fuzzy msgid "Connecting to JACK server..." msgstr "Verbinde mit JACK..." #: src/file.c:200 #, c-format msgid "Could not save file '%s'" msgstr "Konnte die Datei '%s' nicht speichern" #: src/file.c:236 #, c-format msgid "The file '%s' contains an unknown plugin with ID '%ld'; skipping" msgstr "" "Die Datei '%s' enthält ein unbekanntes Plugin mit der ID '%ld'; es wird " "übersprungen" #: src/file.c:463 #, c-format msgid "Could not parse file '%s'" msgstr "Konnte die Datei '%s' nicht auswerten" #: src/file.c:469 #, c-format msgid "The file '%s' is not a JACK Rack settings file" msgstr "Die Datei '%s' ist keine JACK Rack Konfiguration" #: src/file.c:483 msgid "" "The current rack will be cleared.\n" "\n" "Are you sure you want to continue?" msgstr "" "Das aktuelle Rack wird zurückgesetzt.\n" "\n" "Wollen Sie wirklich fortfahren?" #: src/plugin_slot.c:300 msgid "Lock All" msgstr "alle Gruppieren" #: src/plugin_slot.c:423 msgid "Wet/Dry" msgstr "Wet/Dry" #: src/wet_dry_controls.c:105 msgid "Channel" msgstr "Kanal" #: src/main.c:71 #, c-format msgid "Compiled with:\n" msgstr "Kompiliert mit:\n" #: src/main.c:86 #, c-format msgid "Usage: jack-rack [OPTION]..." msgstr "" #: src/main.c:93 msgid "Display this help info" msgstr "Diese Hilfe anzeigen" #: src/main.c:95 msgid "Use the pid in the JACK client name (default)" msgstr "Benutze die PID in der JACK-Clientkennung (Standard)" #: src/main.c:96 msgid "Use in the JACK client name" msgstr "Benutze in der JACK-Clientkennung" #: src/main.c:97 msgid "Use just jack_rack as the client name" msgstr "Benutze jack_rack als JACK-Clientkennung" #: src/main.c:99 msgid "Connected inputs to the first two physical capture ports" msgstr "Eingänge automatisch verbinden" #: src/main.c:100 msgid "Connected outputs to the first two physical playback ports" msgstr "Ausgänge automatsch verbinden" #: src/main.c:101 msgid "How many input and output channels the rack should use (default: 2)" msgstr "" "Anzahl der Ein- und Ausgänge, die das Rack verwenden soll (Standard: 2)" #: src/main.c:197 #, fuzzy, c-format msgid "There must be at least one channel\n" msgstr "JACK Rack benötigt mindestens einen Kanal\n" #: src/main.c:223 #, c-format msgid "Please specify only one file to open" msgstr "" #: src/midi.c:47 #, fuzzy msgid "Connecting to ALSA sequencer" msgstr "Mit dem JACK Server verbunden" #: src/midi.c:53 #, c-format msgid "" "Could not open ALSA sequencer, aborting:\n" "\n" "%s\n" "\n" "Please check that your ALSA configuration is correct." msgstr "" #: src/midi.c:56 #, fuzzy, c-format msgid "Connected to ALSA sequencer with id %d" msgstr "Mit dem JACK Server verbunden" #: src/midi.c:72 #, fuzzy msgid "Creating ALSA sequencer port" msgstr "Erstelle %s Port '%s'" #: src/midi.c:80 #, c-format msgid "" "Could not create ALSA port, aborting:\n" "\n" "%s" msgstr "" #: src/midi.c:82 msgid "Created ALSA sequencer port" msgstr "" #: src/midi.c:140 #, c-format msgid "%s: error sending MIDI event: %s\n" msgstr "" #: src/midi.c:333 #, c-format msgid "%s: could not get scheduling parameters of JACK thread: %s\n" msgstr "" #: src/midi.c:352 #, c-format msgid "%s: could not set SCHED_FIFO for MIDI thread: %s\n" msgstr "" #: src/process.c:171 #, c-format msgid "%s: GUI FIFO is out of space\n" msgstr "" #: src/process.c:226 #, c-format msgid "%s: no JACK buffer for input port %ld\n" msgstr "" #: src/process.c:233 #, c-format msgid "%s: no JACK buffer for output port %ld\n" msgstr "" #: src/process.c:425 #, c-format msgid "%s: no process_info from JACK!\n" msgstr "" #: src/process.c:439 #, c-format msgid "%s: failed to get JACK ports, not processing\n" msgstr "" #: src/process.c:459 #, c-format msgid "Connecting to JACK server with client name '%s'" msgstr "Verbinde zu JACK mit der Kennung '%s'" #: src/process.c:471 msgid "Connected to JACK server" msgstr "Mit dem JACK Server verbunden" #: src/process.c:512 #, c-format msgid "Connecting port '%s' with '%s'" msgstr "Verbinde Port '%s' mit '%s'" #: src/process.c:519 #, fuzzy, c-format msgid "%s: error connecting ports '%s' and '%s'\n" msgstr "Verbinde Port '%s' mit '%s'" #: src/process.c:522 #, c-format msgid "Connected port '%s' with '%s'" msgstr "Port '%s' mit '%s' verbunden" #: src/process.c:571 #, fuzzy, c-format msgid "Creating input port '%s'" msgstr "Erstelle %s Port '%s'" #: src/process.c:576 #, fuzzy, c-format msgid "Creating output port '%s'" msgstr "Erstelle %s Port '%s'" #: src/process.c:591 #, c-format msgid "%s: could not register port '%s'; aborting\n" msgstr "" #: src/process.c:594 #, c-format msgid "Could not register JACK port '%s'; aborting" msgstr "" #: src/midi_window.c:79 msgid "Plugin" msgstr "Plugin" #: src/midi_window.c:84 msgid "Control" msgstr "Steuerung" #: src/midi_window.c:89 msgid "Index" msgstr "Index" #: src/midi_window.c:100 msgid "MIDI Channel" msgstr "MIDI Kanal" #: src/midi_window.c:110 msgid "MIDI Controller" msgstr "MIDI Controller" #: src/midi_window.c:120 msgid "Min Value" msgstr "" #: src/midi_window.c:130 msgid "Max Value" msgstr "" #: src/midi_window.c:154 msgid "JACK Rack MIDI Controls" msgstr "JACK Rack MIDI-Steuerung" #: src/jack_rack.c:75 #, c-format msgid "" "Plugin not RT capable\n" "\n" "The plugin '%s' does not describe itself as being capable of real-time " "operation. If you use it, you may experience drop-outs or unexpected " "disconnection from JACK.\n" "\n" "Are you sure you want to add this plugin?" msgstr "" #: src/jack_rack.c:95 #, c-format msgid "Error loading file plugin '%s' from file '%s'" msgstr "" #: src/plugin.c:308 #, c-format msgid "%s: error finding descriptor symbol in object file '%s': %s\n" msgstr "" #: src/plugin.c:403 #, c-format msgid "Could not register jack port '%s'; aborting" msgstr "" #: src/plugin.c:581 #, c-format msgid "%s: could not unregister jack port\n" msgstr "" #: src/plugin.c:609 #, c-format msgid "%s: error closing shared object '%s': %s\n" msgstr "" #~ msgid "Add a new plugin to the rack" #~ msgstr "Ein neues Plugin zum Rack hinzufügen" #~ msgid "Remove all the plugins from the rack" #~ msgstr "Alle Plugins aus dem Rack entfernen" #~ msgid "Open a rack configuration file" #~ msgstr "Rack-Konfiguration laden" #~ msgid "" #~ "Save the rack configuration to the same file it was saved in last time" #~ msgstr "" #~ "Speichert die Rack-Konfiguration in die selbe Datei, in der sie das " #~ "letzte Mal gespeichert wurde" #~ msgid "Save the rack configuration to a file" #~ msgstr "Rack-Konfiguration in eine Datei speichern" #~ msgid "Save the LASH project" #~ msgstr "LASH-Projekt speichern" #~ msgid "Exit the program" #~ msgstr "Das Programm verlassen" #~ msgid "Created %s port '%s'" #~ msgstr "%s Port '%s' erstellt" jack-rack-f9fb65d/po/fr.po000066400000000000000000000274651151220453700154520ustar00rootroot00000000000000# French translation of jack-rack. # Copyright (C) 2005 Robert Ham # This file is distributed under the same license as the jack-rack package. # Raphaël Doursenaud , 2005. # , fuzzy # # msgid "" msgstr "" "Project-Id-Version: jack-rack 1.4.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-01-09 00:06+0000\n" "PO-Revision-Date: 2007-01-09 05:42+0100\n" "Last-Translator: Raphaël Doursenaud \n" "Language-Team: French\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/ui.c:75 msgid "File" msgstr "Fichier" #: src/ui.c:79 msgid "Rack" msgstr "Rack" #: src/ui.c:85 msgid "Help" msgstr "Aide" #: src/ui.c:127 msgid "Save project" msgstr "Sauvegarder le projet" #: src/ui.c:157 src/ui.c:259 msgid "Channels" msgstr "Canaux" #: src/ui.c:164 msgid "MIDI Controls" msgstr "Contrôles MIDI" #: src/ui.c:176 msgid "About" msgstr "À propos" #: src/ui.c:249 msgid "Add a plugin" msgstr "Ajouter un greffon" #: src/ui.c:260 msgid "Change the number of I/O channels the rack has" msgstr "Changer le nombre de canaux d'E/S du rack" #: src/ui.c:268 msgid "Clear the rack" msgstr "Vider le rack" #: src/ui.c:274 msgid "Load a previously-saved rack configuration" msgstr "Ouvrir une configuration du rack précédemment sauvegardée" #: src/ui.c:279 msgid "Save the rack configuration to the current file" msgstr "Sauvegarder la configuration du rack dans le fichier courant" #: src/ui.c:284 msgid "Save the rack configuration to a new file" msgstr "Sauvegarder la configuration du rack dans un nouveau fichier" #: src/ui.c:295 msgid "Save the current LASH project" msgstr "Sauvegarder le projet LASH actuel" #: src/ui.c:305 msgid "Quit JACK Rack" msgstr "Quitter JACK Rack" #: src/ui.c:334 msgid "Add MIDI control" msgstr "Ajouter un contrôle MIDI" #: src/plugin_mgr.c:88 src/plugin.c:293 #, c-format msgid "%s: error opening shared object file '%s': %s\n" msgstr "" #: src/plugin_mgr.c:102 #, c-format msgid "%s: error finding ladspa_descriptor symbol in object file '%s': %s\n" msgstr "" #: src/plugin_mgr.c:133 #, c-format msgid "Plugin %ld exists in both '%s' and '%s'; using version in '%s'\n" msgstr "" #: src/plugin_mgr.c:146 #, fuzzy, c-format msgid "Loaded plugin '%s'" msgstr "Ajouter un greffon" #: src/plugin_mgr.c:152 #, c-format msgid "%s: error closing object file '%s': %s\n" msgstr "" #: src/plugin_mgr.c:198 src/plugin_mgr.c:615 #, c-format msgid "%s: error closing directory '%s': %s\n" msgstr "" #: src/plugin_mgr.c:248 msgid "" "No LADSPA plugins were found!\n" "\n" "Check your LADSPA_PATH environment variable." msgstr "" #: src/plugin_mgr.c:333 msgid ", NOT RT" msgstr ", NON TR" #: src/plugin_mgr.c:336 #, c-format msgid ", %ld aux %s" msgstr "" #: src/plugin_mgr.c:338 msgid "in" msgstr "" #: src/plugin_mgr.c:338 #, fuzzy msgid "out" msgstr "À propos" #: src/plugin_mgr.c:345 msgid "ch" msgstr "can" #: src/plugin_mgr.c:542 msgid "Uncategorised" msgstr "" #: src/plugin_mgr.c:610 #, c-format msgid "Found LRDF description file '%s'" msgstr "" #: src/plugin_mgr.c:650 #, fuzzy, c-format msgid "%s: could not parse LRDF file '%s'\n" msgstr "Impossible d'analyser le fichier '%s'" #: src/port_controls.c:274 src/wet_dry_controls.c:89 msgid "Lock" msgstr "Verrouiller" #: src/port_controls.c:361 msgid "On" msgstr "Activé" #: src/midi_control.c:280 msgid "Wet/dry" msgstr "Traité/Direct" #: src/midi_control.c:285 src/plugin_slot.c:412 msgid "Enable" msgstr "Activer" #: src/ui_callbacks.c:59 #, c-format msgid "%s: no plugin description!\n" msgstr "" #: src/ui_callbacks.c:78 msgid "I/O Channels" msgstr "Canaux d'E/S" #: src/ui_callbacks.c:91 msgid "" "Warning: changing the number of\n" "channels will clear the current rack" msgstr "" "Attention: changer le nombre de\n" "canaux videra le rack actuel" #: src/ui_callbacks.c:133 msgid "Open File" msgstr "Ouvrir un fichier" #: src/ui_callbacks.c:174 msgid "Save File" msgstr "Sauvegarder un fichier" #: src/ui_callbacks.c:259 msgid "A LADSPA effects rack for the JACK audio API" msgstr "Un rack d'effets LADSPA pour l'API audio JACK" #: src/ui_callbacks.c:263 msgid "__TRANSLATOR_CREDITS" msgstr "Raphaël Doursenaud" #: src/ui_callbacks.c:333 #, c-format msgid "LASH server disconnected\n" msgstr "Serveur LASH déconnecté\n" #: src/ui_callbacks.c:340 #, c-format msgid "Received LASH event of unknown type %d\n" msgstr "" #: src/ui_callbacks.c:499 msgid "Connecting to JACK..." msgstr "Connexion à JACK..." #: src/ui_callbacks.c:503 #, fuzzy msgid "Connecting to JACK server..." msgstr "Connexion à JACK..." #: src/file.c:200 #, c-format msgid "Could not save file '%s'" msgstr "Impossible de sauvegarder le fichier '%s'" #: src/file.c:236 #, c-format msgid "The file '%s' contains an unknown plugin with ID '%ld'; skipping" msgstr "" "Le fichier '%s' contient un greffon inconnu portant l'ID '%ld'; je passe" #: src/file.c:463 #, c-format msgid "Could not parse file '%s'" msgstr "Impossible d'analyser le fichier '%s'" #: src/file.c:469 #, c-format msgid "The file '%s' is not a JACK Rack settings file" msgstr "Le fichier '%s' n'est pas un fichier de configuration JACK Rack" #: src/file.c:483 msgid "" "The current rack will be cleared.\n" "\n" "Are you sure you want to continue?" msgstr "" "Le rack actuel sera vidé.\n" "\n" "Êtes-vous sûr de vouloir continuer­?" #: src/plugin_slot.c:300 msgid "Lock All" msgstr "Tout Verrouiller" #: src/plugin_slot.c:423 msgid "Wet/Dry" msgstr "Traité/Direct" #: src/wet_dry_controls.c:105 msgid "Channel" msgstr "Canal" #: src/main.c:71 #, c-format msgid "Compiled with:\n" msgstr "Compilé avec :\n" #: src/main.c:86 #, c-format msgid "Usage: jack-rack [OPTION]..." msgstr "" #: src/main.c:93 msgid "Display this help info" msgstr "Afficher ce message d'aide" #: src/main.c:95 msgid "Use the pid in the JACK client name (default)" msgstr "Utiliser le pid dans le nom de client JACK (défaut)" #: src/main.c:96 msgid "Use in the JACK client name" msgstr "Utiliser dans le nom de client JACK" #: src/main.c:97 msgid "Use just jack_rack as the client name" msgstr "Utiliser simplement jack_rack en tant que nom de client" #: src/main.c:99 msgid "Connected inputs to the first two physical capture ports" msgstr "Entrées connectées aux deux premiers ports de capture physiques" #: src/main.c:100 msgid "Connected outputs to the first two physical playback ports" msgstr "orties connectées aux deux premiers ports de reproduction physiques" #: src/main.c:101 msgid "How many input and output channels the rack should use (default: 2)" msgstr "" "Combien de canaux d'entrée et de sortie le rack doit-il utiliser­? (par " "défaut:2)" #: src/main.c:197 #, fuzzy, c-format msgid "There must be at least one channel\n" msgstr "il doit y avoir au moins un canal\n" #: src/main.c:223 #, c-format msgid "Please specify only one file to open" msgstr "" #: src/midi.c:47 #, fuzzy msgid "Connecting to ALSA sequencer" msgstr "Connecté au serveur JACK" #: src/midi.c:53 #, c-format msgid "" "Could not open ALSA sequencer, aborting:\n" "\n" "%s\n" "\n" "Please check that your ALSA configuration is correct." msgstr "" #: src/midi.c:56 #, fuzzy, c-format msgid "Connected to ALSA sequencer with id %d" msgstr "Connecté au serveur JACK" #: src/midi.c:72 #, fuzzy msgid "Creating ALSA sequencer port" msgstr "Création %s port %s" #: src/midi.c:80 #, c-format msgid "" "Could not create ALSA port, aborting:\n" "\n" "%s" msgstr "" #: src/midi.c:82 msgid "Created ALSA sequencer port" msgstr "" #: src/midi.c:140 #, c-format msgid "%s: error sending MIDI event: %s\n" msgstr "" #: src/midi.c:333 #, c-format msgid "%s: could not get scheduling parameters of JACK thread: %s\n" msgstr "" #: src/midi.c:352 #, c-format msgid "%s: could not set SCHED_FIFO for MIDI thread: %s\n" msgstr "" #: src/process.c:171 #, c-format msgid "%s: GUI FIFO is out of space\n" msgstr "" #: src/process.c:226 #, c-format msgid "%s: no JACK buffer for input port %ld\n" msgstr "" #: src/process.c:233 #, c-format msgid "%s: no JACK buffer for output port %ld\n" msgstr "" #: src/process.c:425 #, c-format msgid "%s: no process_info from JACK!\n" msgstr "" #: src/process.c:439 #, c-format msgid "%s: failed to get JACK ports, not processing\n" msgstr "" #: src/process.c:459 #, c-format msgid "Connecting to JACK server with client name '%s'" msgstr "Connexion au serveur JACK avec le nom de client '%s'" #: src/process.c:471 msgid "Connected to JACK server" msgstr "Connecté au serveur JACK" #: src/process.c:512 #, c-format msgid "Connecting port '%s' with '%s'" msgstr "Connexion des ports '%s' avec '%s'" #: src/process.c:519 #, fuzzy, c-format msgid "%s: error connecting ports '%s' and '%s'\n" msgstr "Connexion des ports '%s' avec '%s'" #: src/process.c:522 #, c-format msgid "Connected port '%s' with '%s'" msgstr "Ports '%s' connectés avec '%s'" #: src/process.c:571 #, fuzzy, c-format msgid "Creating input port '%s'" msgstr "Création %s port %s" #: src/process.c:576 #, fuzzy, c-format msgid "Creating output port '%s'" msgstr "Création %s port %s" #: src/process.c:591 #, c-format msgid "%s: could not register port '%s'; aborting\n" msgstr "" #: src/process.c:594 #, c-format msgid "Could not register JACK port '%s'; aborting" msgstr "" #: src/midi_window.c:79 msgid "Plugin" msgstr "Greffon" #: src/midi_window.c:84 msgid "Control" msgstr "Contrôle" #: src/midi_window.c:89 msgid "Index" msgstr "Index" #: src/midi_window.c:100 msgid "MIDI Channel" msgstr "Canal MIDI" #: src/midi_window.c:110 msgid "MIDI Controller" msgstr "Contrôleur MIDI" #: src/midi_window.c:120 msgid "Min Value" msgstr "" #: src/midi_window.c:130 msgid "Max Value" msgstr "" #: src/midi_window.c:154 msgid "JACK Rack MIDI Controls" msgstr "Contrôles MIDI Jack Rack" #: src/jack_rack.c:75 #, c-format msgid "" "Plugin not RT capable\n" "\n" "The plugin '%s' does not describe itself as being capable of real-time " "operation. If you use it, you may experience drop-outs or unexpected " "disconnection from JACK.\n" "\n" "Are you sure you want to add this plugin?" msgstr "" #: src/jack_rack.c:95 #, c-format msgid "Error loading file plugin '%s' from file '%s'" msgstr "" #: src/plugin.c:308 #, c-format msgid "%s: error finding descriptor symbol in object file '%s': %s\n" msgstr "" #: src/plugin.c:403 #, c-format msgid "Could not register jack port '%s'; aborting" msgstr "" #: src/plugin.c:581 #, c-format msgid "%s: could not unregister jack port\n" msgstr "" #: src/plugin.c:609 #, c-format msgid "%s: error closing shared object '%s': %s\n" msgstr "" #~ msgid "Add a new plugin to the rack" #~ msgstr "Ajouter un nouveau greffon dans le rack" #~ msgid "Remove all the plugins from the rack" #~ msgstr "Enlever tous les greffons du RACK" #~ msgid "Open a rack configuration file" #~ msgstr "Ouvrir un fichier de configuration du rack" #~ msgid "" #~ "Save the rack configuration to the same file it was saved in last time" #~ msgstr "" #~ "Sauvegarder la configuration du rack dans le même fichier que la dernière " #~ "sauvegarde" #~ msgid "Save the rack configuration to a file" #~ msgstr "Sauvegarder la configuration du rack dans un fichier" #~ msgid "Save the LASH project" #~ msgstr "Sauvegarder le projet LASH" #~ msgid "Exit the program" #~ msgstr "Sortir du programme" #~ msgid "Created %s port '%s'" #~ msgstr "%s port %s créé" #~ msgid "" #~ "%s\n" #~ "\n" #~ "%s%s" #~ msgstr "" #~ "%s\n" #~ "\n" #~ "%s%s" #~ msgid "JACK client thread shut down by server" #~ msgstr "Processus client JACK arrêté par le serveur" #~ msgid "JACK, the bastard, kicked us out. " #~ msgstr "JACK, le bâtard, nous a virés. " #~ msgid "You'll have to restart I'm afraid. Sorry." #~ msgstr "Je crains que vous n'ayez à redémarrer. Désolé." #~ msgid "" #~ "Could not create JACK client\n" #~ "\n" #~ "Is the jackd server running?" #~ msgstr "" #~ "Impossible de créer le client JACK\n" #~ "\n" #~ "Le serveur JACK s'exécute-t-il?" jack-rack-f9fb65d/po/ru.po000066400000000000000000000375201151220453700154620ustar00rootroot00000000000000# translation of ru.po to Russian # Alexandre Prokoudine , 2003 # Александр Прокудин , 2010. # msgid "" msgstr "" "Project-Id-Version: JACK Rack 1.4.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-01-09 00:06+0000\n" "PO-Revision-Date: 2010-12-10 04:22+0300\n" "Last-Translator: Александр Прокудин \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: UTF-8\n" "X-Generator: KBabel 1.0.1\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); 10<=4 && (n%100<10 || n" "%100>=20) ? 1 : 2);\n" #: src/ui.c:75 msgid "File" msgstr "Файл" #: src/ui.c:79 msgid "Rack" msgstr "Стойка" #: src/ui.c:85 msgid "Help" msgstr "Справка" #: src/ui.c:127 msgid "Save project" msgstr "Сохранить·проект" #: src/ui.c:157 src/ui.c:259 msgid "Channels" msgstr "Каналы" #: src/ui.c:164 msgid "MIDI Controls" msgstr "MIDI-регуляторы" #: src/ui.c:176 msgid "About" msgstr "О программе" #: src/ui.c:249 msgid "Add a plugin" msgstr "Добавить·модуль" #: src/ui.c:260 msgid "Change the number of I/O channels the rack has" msgstr "Изменить·количество·портов·I/O стойки эффектов" #: src/ui.c:268 msgid "Clear the rack" msgstr "Стереть·набор·эффектов" #: src/ui.c:274 msgid "Load a previously-saved rack configuration" msgstr "Открыть·конфигурацию стойки эффектов" #: src/ui.c:279 msgid "Save the rack configuration to the current file" msgstr "Сохранить·конфигурацию стойки эффектов" #: src/ui.c:284 msgid "Save the rack configuration to a new file" msgstr "Сохранить·конфигурацию стойки эффектов в новый файл" #: src/ui.c:295 msgid "Save the current LASH project" msgstr "Сохранить·текущий проект LASH" #: src/ui.c:305 msgid "Quit JACK Rack" msgstr "Выйти·из·JACK Rack" #: src/ui.c:334 msgid "Add MIDI control" msgstr "Добавить·MIDI-регулятор" #: src/plugin_mgr.c:88 src/plugin.c:293 #, c-format msgid "%s: error opening shared object file '%s': %s\n" msgstr "" #: src/plugin_mgr.c:102 #, c-format msgid "%s: error finding ladspa_descriptor symbol in object file '%s': %s\n" msgstr "" #: src/plugin_mgr.c:133 #, c-format msgid "Plugin %ld exists in both '%s' and '%s'; using version in '%s'\n" msgstr "" "Модуль %ld существует в двух версиях: '%s' и '%s'; используем версию '%s'\n" #: src/plugin_mgr.c:146 #, c-format msgid "Loaded plugin '%s'" msgstr "Загружен·модуль·'%s'" #: src/plugin_mgr.c:152 #, c-format msgid "%s: error closing object file '%s': %s\n" msgstr "" #: src/plugin_mgr.c:198 src/plugin_mgr.c:615 #, c-format msgid "%s: error closing directory '%s': %s\n" msgstr "" #: src/plugin_mgr.c:248 msgid "" "No LADSPA plugins were found!\n" "\n" "Check your LADSPA_PATH environment variable." msgstr "" "Не найдено ни единого LADSPA-модуля!\n" "\n" "Проверьте переменную окружения LADSPA_PATH." #: src/plugin_mgr.c:333 msgid ", NOT RT" msgstr ", НЕ RT" #: src/plugin_mgr.c:336 #, c-format msgid ", %ld aux %s" msgstr "" #: src/plugin_mgr.c:338 msgid "in" msgstr "вх" #: src/plugin_mgr.c:338 msgid "out" msgstr "вых" #: src/plugin_mgr.c:345 msgid "ch" msgstr "к" #: src/plugin_mgr.c:542 msgid "Uncategorised" msgstr "Без категории" #: src/plugin_mgr.c:610 #, c-format msgid "Found LRDF description file '%s'" msgstr "Найден файл описания LRDF '%s'" #: src/plugin_mgr.c:650 #, c-format msgid "%s: could not parse LRDF file '%s'\n" msgstr "%s: не·удалось·выполнить·разбор·файла·LRDF '%s'\n" #: src/port_controls.c:274 src/wet_dry_controls.c:89 msgid "Lock" msgstr "Блокировать" #: src/port_controls.c:361 msgid "On" msgstr "Вкл" #: src/midi_control.c:280 msgid "Wet/dry" msgstr "До/После" #: src/midi_control.c:285 src/plugin_slot.c:412 msgid "Enable" msgstr "Включить" #: src/ui_callbacks.c:59 #, c-format msgid "%s: no plugin description!\n" msgstr "%s: нет описания эффекта!\n" #: src/ui_callbacks.c:78 msgid "I/O Channels" msgstr "Каналы I/O" #: src/ui_callbacks.c:91 msgid "" "Warning: changing the number of\n" "channels will clear the current rack" msgstr "" "Предупреждение: изменение·количества·каналов приведёт\n" "к·стиранию·текущих·настроек·эффект-процессора" #: src/ui_callbacks.c:133 msgid "Open File" msgstr "Открыть файл" #: src/ui_callbacks.c:174 msgid "Save File" msgstr "Сохранить файл" #: src/ui_callbacks.c:259 msgid "A LADSPA effects rack for the JACK audio API" msgstr "Стойка эффектов обработки LADSPA для JACK" #: src/ui_callbacks.c:263 msgid "__TRANSLATOR_CREDITS" msgstr "Александр Прокудин " #: src/ui_callbacks.c:333 #, c-format msgid "LASH server disconnected\n" msgstr "Разорвано соединение с LASH-сервером\n" #: src/ui_callbacks.c:340 #, c-format msgid "Received LASH event of unknown type %d\n" msgstr "" #: src/ui_callbacks.c:499 msgid "Connecting to JACK..." msgstr "Выполняется соединение с JACK..." #: src/ui_callbacks.c:503 msgid "Connecting to JACK server..." msgstr "Выполняется соединение с сервером JACK..." #: src/file.c:200 #, c-format msgid "Could not save file '%s'" msgstr "Не·удалось·сохранить·файл·'%s'" #: src/file.c:236 #, c-format msgid "The file '%s' contains an unknown plugin with ID '%ld'; skipping" msgstr "Файл·'%s' содержит·неизвестный·модуль·с·ID '%ld'·и·будет·пропущен" #: src/file.c:463 #, c-format msgid "Could not parse file '%s'" msgstr "Не·удалось·произвести·синтаксический·разбор·файла·'%s'" #: src/file.c:469 #, c-format msgid "The file '%s' is not a JACK Rack settings file" msgstr "'%s' не·является·файлом·настроек JACK Rack" #: src/file.c:483 msgid "" "The current rack will be cleared.\n" "\n" "Are you sure you want to continue?" msgstr "" " Текущий·набор·эффектов·будет·стёрт.\n" " ·\n" " ·Вы·уверены,·что·хотите·продолжить?" #: src/plugin_slot.c:300 msgid "Lock All" msgstr "Блокировать·все" #: src/plugin_slot.c:423 msgid "Wet/Dry" msgstr "До/После" #: src/wet_dry_controls.c:105 msgid "Channel" msgstr "Канал" #: src/main.c:71 #, c-format msgid "Compiled with:\n" msgstr "Скомпилировано·с:\n" #: src/main.c:86 #, c-format msgid "Usage: jack-rack [OPTION]..." msgstr "Использование: jack-rack [АРГУМЕНТ]..." #: src/main.c:93 msgid "Display this help info" msgstr "Отображать·эту справку" #: src/main.c:95 msgid "Use the pid in the JACK client name (default)" msgstr "Использовать·этот pid в·имени·JACK-клиенте (по·умолчанию)" #: src/main.c:96 msgid "Use in the JACK client name" msgstr "Использовать· в·имени JACK-клиента" #: src/main.c:97 msgid "Use just jack_rack as the client name" msgstr "Использовать·только·jack_rack·в·качестве·имени·клиента" #: src/main.c:99 msgid "Connected inputs to the first two physical capture ports" msgstr "Входы·подключены·к·первым·двум·физическим·портам·записи" #: src/main.c:100 msgid "Connected outputs to the first two physical playback ports" msgstr "Выходы·подключены·к·первым·двум·физическим·портам·воспроизведения" #: src/main.c:101 msgid "How many input and output channels the rack should use (default: 2)" msgstr "" "Сколько·каналов·I/O стойка·эффектов должна·использовать (по·умолчанию: 2)" #: src/main.c:197 #, c-format msgid "There must be at least one channel\n" msgstr "Должно·быть·не·менее·одного·канала\n" #: src/main.c:223 #, c-format msgid "Please specify only one file to open" msgstr "Выберите только один файл для открытия" #: src/midi.c:47 msgid "Connecting to ALSA sequencer" msgstr "Устанавливается соединение с ALSA sequencer" #: src/midi.c:53 #, c-format msgid "" "Could not open ALSA sequencer, aborting:\n" "\n" "%s\n" "\n" "Please check that your ALSA configuration is correct." msgstr "" "Не удалось установить соединение с секвенсером ALSA, операция прерывается\n" "\n" "%s\n" "\n" "Убедитесь в том, что подсистема ALSA корректно настроена." #: src/midi.c:56 #, c-format msgid "Connected to ALSA sequencer with id %d" msgstr "Установлено соединение с ALSA sequencer с id %d" #: src/midi.c:72 msgid "Creating ALSA sequencer port" msgstr "Создаётся порт для ALSA sequencer" #: src/midi.c:80 #, c-format msgid "" "Could not create ALSA port, aborting:\n" "\n" "%s" msgstr "" "Не удалось создать порт для ALSA, операция прерывается\n" "\n" "%s" #: src/midi.c:82 msgid "Created ALSA sequencer port" msgstr "Создан порт для ALSA sequencer" #: src/midi.c:140 #, c-format msgid "%s: error sending MIDI event: %s\n" msgstr "" #: src/midi.c:333 #, c-format msgid "%s: could not get scheduling parameters of JACK thread: %s\n" msgstr "" #: src/midi.c:352 #, c-format msgid "%s: could not set SCHED_FIFO for MIDI thread: %s\n" msgstr "" #: src/process.c:171 #, c-format msgid "%s: GUI FIFO is out of space\n" msgstr "" #: src/process.c:226 #, c-format msgid "%s: no JACK buffer for input port %ld\n" msgstr "" #: src/process.c:233 #, c-format msgid "%s: no JACK buffer for output port %ld\n" msgstr "" #: src/process.c:425 #, c-format msgid "%s: no process_info from JACK!\n" msgstr "" #: src/process.c:439 #, c-format msgid "%s: failed to get JACK ports, not processing\n" msgstr "" #: src/process.c:459 #, c-format msgid "Connecting to JACK server with client name '%s'" msgstr "Устанавливается соединение клиента '%s' с JACK-сервером" #: src/process.c:471 msgid "Connected to JACK server" msgstr "Установлено соединение с JACK-сервером" #: src/process.c:512 #, c-format msgid "Connecting port '%s' with '%s'" msgstr "Порт '%s' соединяется с '%s'" #: src/process.c:519 #, c-format msgid "%s: error connecting ports '%s' and '%s'\n" msgstr "%s: ошибка при соединении портов '%s' и '%s'\n" #: src/process.c:522 #, c-format msgid "Connected port '%s' with '%s'" msgstr "Порт '%s' соединён с '%s'" #: src/process.c:571 #, c-format msgid "Creating input port '%s'" msgstr "Создаётся порт входа '%s'" #: src/process.c:576 #, c-format msgid "Creating output port '%s'" msgstr "Создаётся порт выхода '%s'" #: src/process.c:591 #, c-format msgid "%s: could not register port '%s'; aborting\n" msgstr "%s: не удалось зарегистрировать порт '%s'; операция прерывается\n" #: src/process.c:594 #, c-format msgid "Could not register JACK port '%s'; aborting" msgstr "Не удалось зарегистрировать порт '%s' в JACK; операция прерывается" #: src/midi_window.c:79 msgid "Plugin" msgstr "Модуль" #: src/midi_window.c:84 msgid "Control" msgstr "Регулятор" #: src/midi_window.c:89 msgid "Index" msgstr "Индекс" #: src/midi_window.c:100 msgid "MIDI Channel" msgstr "MIDI-канал" #: src/midi_window.c:110 msgid "MIDI Controller" msgstr "MIDI-контроллер" #: src/midi_window.c:120 msgid "Min Value" msgstr "Мин. значение" #: src/midi_window.c:130 msgid "Max Value" msgstr "Макс. значение" #: src/midi_window.c:154 msgid "JACK Rack MIDI Controls" msgstr "MIDI-регуляторы·JACK Rack" #: src/jack_rack.c:75 #, c-format msgid "" "Plugin not RT capable\n" "\n" "The plugin '%s' does not describe itself as being capable of real-time " "operation. If you use it, you may experience drop-outs or unexpected " "disconnection from JACK.\n" "\n" "Are you sure you want to add this plugin?" msgstr "" "Эффект не предназначен для работы в режиме реального времени\n" "\n" "Эффект '%s' не описывает себя как модуль для работы в режиме \n" "реального времени. Вы можете слышать неприятные артефакты, и \n" "JACK-сервер может даже отключить JACK Rack, если вы попытаетесь \n" "использовать этот модуль.\n" "\n" "Вы действительно хотите добавить этот эффект?" #: src/jack_rack.c:95 #, c-format msgid "Error loading file plugin '%s' from file '%s'" msgstr "Ошибка при загрузке модуля '%s' из файла '%s'" #: src/plugin.c:308 #, c-format msgid "%s: error finding descriptor symbol in object file '%s': %s\n" msgstr "" #: src/plugin.c:403 #, c-format msgid "Could not register jack port '%s'; aborting" msgstr "Не удалось зарегистрировать порт '%s' для jack; операция прерывается" #: src/plugin.c:581 #, c-format msgid "%s: could not unregister jack port\n" msgstr "%s: не удалось аннулировать регистрацию порта JACK\n" #: src/plugin.c:609 #, c-format msgid "%s: error closing shared object '%s': %s\n" msgstr "" #, fuzzy #~ msgid "Add a new plugin to the rack" #~ msgstr "Добавить·модуль" #~ msgid "Open a rack configuration file" #~ msgstr "Открыть·файл·настроек·эффект-процессора" #, fuzzy #~ msgid "" #~ "Save the rack configuration to the same file it was saved in last time" #~ msgstr "Сохранить·настройки·эффект-процессора·в·текущий·файл" #~ msgid "Save the rack configuration to a file" #~ msgstr "Сохранить·настройки·эффект-процессора·в·файл" #~ msgid "Save the LASH project" #~ msgstr "Сохранить·LASH-проект" #, fuzzy #~ msgid "Created %s port '%s'" #~ msgstr "Создан %s порт %s" #~ msgid "" #~ "%s\n" #~ "\n" #~ "%s%s" #~ msgstr "" #~ "%s\n" #~ "\n" #~ "%s%s" #~ msgid "JACK client thread shut down by server" #~ msgstr "Нить процесса JACK-клиент уничтожена сервером" #~ msgid "JACK, the bastard, kicked us out. " #~ msgstr "JACK нас \"выкинул\". " #~ msgid "You'll have to restart I'm afraid. Sorry." #~ msgstr "Боюсь, вам придётся перезагрузить программу..." #~ msgid "" #~ "Could not create JACK client\n" #~ "\n" #~ "Is the jackd server running?" #~ msgstr "" #~ "Не удалось создать JACK-клиент\n" #~ "\n" #~ "Загружен ли jackd (JACK-сервер)?" #~ msgid "Tell JACK to use

for its temporary files" #~ msgstr "Заставить JACK использовать· для·хранения·временных·файлов" #~ msgid "Controller" #~ msgstr "Контроллер" jack-rack-f9fb65d/src/000077500000000000000000000000001151220453700146365ustar00rootroot00000000000000jack-rack-f9fb65d/src/Makefile.am000066400000000000000000000032161151220453700166740ustar00rootroot00000000000000localedir = $(datadir)/locale DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ pixmapdir = $(datadir)/pixmaps EXTRA_DIST = \ jack_rack_1.0.dtd \ jack_rack_1.1.dtd \ jack_rack_1.2.dtd \ jack_rack_1.3.dtd dtddir = $(datadir)/dtds dtd_DATA = \ jack_rack_1.0.dtd \ jack_rack_1.1.dtd \ jack_rack_1.2.dtd \ jack_rack_1.3.dtd bin_PROGRAMS = jack-rack jack_rack_SOURCES = \ midi_window.c midi_window.h \ midi_control.c midi_control.h \ wet_dry_controls.c wet_dry_controls.h \ file.c file.h \ midi.c midi.h \ util.c util.h \ plugin_settings.c plugin_settings.h \ process.c process.h \ plugin_desc.c plugin_desc.h \ plugin_mgr.c plugin_mgr.h \ ui.c ui.h \ plugin.c plugin.h \ port_controls.c port_controls.h \ plugin_slot.c plugin_slot.h \ jack_rack.h jack_rack.c \ lock_free_fifo.c lock_free_fifo.h \ ui_callbacks.c ui_callbacks.h \ plugin_slot_callbacks.c plugin_slot_callbacks.h \ control_callbacks.c control_callbacks.h \ control_message.h \ main.c \ globals.h \ types.h jack_rack_CFLAGS = \ $(GTK_CFLAGS) \ $(GNOMEUI_CFLAGS) \ $(JACK_CFLAGS) \ $(LASH_CFLAGS) \ $(LRDF_CFLAGS) \ $(ALSA_CFLAGS) \ $(XML_CFLAGS) \ -DPKGDATADIR=\"$(pkgdatadir)\" \ -DPIXMAPDIR=\"$(pixmapdir)\" \ -DDTDDIR=\"$(dtddir)\" \ -DG_DISABLE_DEPRECATED=1 \ -DGTK_DISABLE_DEPRECATED=1 \ -DGDK_DISABLE_DEPRECATED=1 \ -DGDK_PIXBUF_DISABLE_DEPRECATED=1 \ -DGNOME_DISABLE_DEPRECATED=1 jack_rack_LDFLAGS = \ $(JACK_LIBS) \ $(GTK_LIBS) \ $(GNOMEUI_LIBS) \ $(LASH_LIBS) \ $(LRDF_LIBS) \ $(ALSA_LIBS) \ $(XML_LIBS) splint-check: splint +systemdirs /usr/include:/usr/local/lib \ -sys-dir-errors \ -systemdirerrors \ +posixlib \ $(jack_rack_CFLAGS) \ *.c jack-rack-f9fb65d/src/control_callbacks.c000066400000000000000000000303601151220453700204630ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #define _GNU_SOURCE #include "ac_config.h" #include #include #include #include #include #include #include "jack_rack.h" #include "lock_free_fifo.h" #include "control_callbacks.h" #include "control_message.h" #include "globals.h" #include "file.h" #include "ui.h" #include "wet_dry_controls.h" /* lock a specific control with a click+ctrl */ gboolean control_button_press_cb (GtkWidget * widget, GdkEventButton * event, gpointer user_data) { port_controls_t * port_controls; guint copy; port_controls = (port_controls_t *) user_data; copy = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT(widget), "jack-rack-plugin-copy")); if (event->state & GDK_CONTROL_MASK) { switch (event->button) { /* lock the control row */ case 1: if (port_controls->locked) return FALSE; port_controls->lock_copy = copy; gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (port_controls->lock), TRUE); return TRUE; /* lock all */ case 3: if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (port_controls->plugin_slot->lock_all))) return FALSE; g_object_set_data (G_OBJECT(port_controls->plugin_slot->lock_all), "jack-rack-lock-copy", GINT_TO_POINTER (copy)); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (port_controls->plugin_slot->lock_all), TRUE); return TRUE; default: break; } } #ifdef HAVE_ALSA else if (event->button == 3) { /* right click; display midi menu */ ui_t * ui; ui = port_controls->plugin_slot->jack_rack->ui; g_object_set_data (G_OBJECT (ui->midi_menu_item), "jack-rack-ctrl-type", GINT_TO_POINTER(0/*LADSPA_CONTROL*/)); g_object_set_data (G_OBJECT (ui->midi_menu_item), "jack-rack-port-control", GINT_TO_POINTER (TRUE)); g_object_set_data (G_OBJECT (ui->midi_menu_item), "jack-rack-port-controls", port_controls); g_object_set_data (G_OBJECT (ui->midi_menu_item), "jack-rack-plugin-copy", GUINT_TO_POINTER (copy)); gtk_menu_popup (GTK_MENU (ui->midi_menu), NULL, NULL, NULL, NULL, event->button, event->time); return TRUE; } #endif /* HAVE_ALSA */ return FALSE; } #ifdef HAVE_ALSA gboolean wet_dry_button_press_cb (GtkWidget * widget, GdkEventButton * event, gpointer user_data) { if (event->button == 3) { /* right click; display midi menu */ ui_t * ui; wet_dry_controls_t * wet_dry; wet_dry = (wet_dry_controls_t *) user_data; ui = wet_dry->plugin_slot->jack_rack->ui; g_object_set_data (G_OBJECT (ui->midi_menu_item), "jack-rack-ctrl-type", GINT_TO_POINTER(1/*WET_DRY_CONTROL*/)); g_object_set_data (G_OBJECT (ui->midi_menu_item), "jack-rack-wet-dry", wet_dry); g_object_set_data (G_OBJECT (ui->midi_menu_item), "jack-rack-wet-dry-channel", g_object_get_data (G_OBJECT(widget), "jack-rack-wet-dry-channel")); gtk_menu_popup (GTK_MENU (ui->midi_menu), NULL, NULL, NULL, NULL, event->button, event->time); return TRUE; } return FALSE; } void control_add_midi_cb (GtkMenuItem * menuitem, gpointer user_data) { plugin_slot_t * plugin_slot; midi_control_t * midi_ctrl; midi_control_type_t ctrl_type = GPOINTER_TO_INT(g_object_get_data (G_OBJECT(menuitem), "jack-rack-ctrl-type")); switch(ctrl_type) { case LADSPA_CONTROL: { gboolean port_control = GPOINTER_TO_INT (g_object_get_data (G_OBJECT(menuitem), "jack-rack-port-control")); if (port_control) { port_controls_t * port_controls; guint copy; port_controls = g_object_get_data (G_OBJECT(menuitem), "jack-rack-port-controls"); copy = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT(menuitem), "jack-rack-plugin-copy")); plugin_slot = port_controls->plugin_slot; midi_ctrl = ladspa_midi_control_new (plugin_slot, copy, port_controls->control_index); midi_control_set_midi_channel (midi_ctrl, 1); midi_control_set_midi_param (midi_ctrl, jack_rack_get_next_midi_param (plugin_slot->jack_rack, 1)); plugin_slot_add_midi_control (plugin_slot, midi_ctrl); } break; } case WET_DRY_CONTROL: { wet_dry_controls_t * wet_dry; unsigned long channel; wet_dry = g_object_get_data (G_OBJECT(menuitem), "jack-rack-wet-dry"); channel = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT(menuitem), "jack-rack-wet-dry-channel")); plugin_slot = wet_dry->plugin_slot; midi_ctrl = wet_dry_midi_control_new (plugin_slot, channel); midi_control_set_midi_channel (midi_ctrl, 1); midi_control_set_midi_param (midi_ctrl, jack_rack_get_next_midi_param (plugin_slot->jack_rack, 1)); plugin_slot_add_midi_control (plugin_slot, midi_ctrl); break; } case PLUGIN_ENABLE_CONTROL: { plugin_slot = g_object_get_data (G_OBJECT(menuitem), "jack-rack-plugin-slot"); midi_ctrl = toggle_midi_control_new(plugin_slot); plugin_slot_add_midi_control (plugin_slot, midi_ctrl); break; } } } #endif /* HAVE_ALSA */ static void gtk_widget_set_text_colour (GtkWidget * widget, const char * colour_str) { GdkColor colour; GdkColormap * colourmap; colourmap = gtk_widget_get_colormap (widget); gdk_color_parse (colour_str, &colour); gdk_colormap_alloc_color (colourmap, &colour, FALSE, TRUE); gtk_widget_modify_text (widget, GTK_STATE_NORMAL, &colour); } void control_float_cb (GtkRange * range, gpointer user_data) { port_controls_t * port_controls; LADSPA_Data value; guint copy; gchar *str; port_controls = (port_controls_t *) user_data; value = gtk_range_get_value (range); if (port_controls->logarithmic) value = exp (value); copy = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT(range), "jack-rack-plugin-copy")); port_control_send_value (port_controls, copy, value); /* print the value in the text box */ str = g_strdup_printf ("%f", value); gtk_entry_set_text (GTK_ENTRY(port_controls->controls[copy].text), str); g_free (str); /* possibly set our peers */ if (port_controls->plugin_slot->plugin->copies > 1 && port_controls->locked) { guint i; for (i = 0; i < port_controls->plugin_slot->plugin->copies; i++) { if (i != copy) gtk_range_set_value (GTK_RANGE(port_controls->controls[i].control), gtk_range_get_value (range)); } } gtk_widget_set_text_colour (port_controls->controls[copy].text, "Black"); } void control_float_text_cb (GtkEntry * entry, gpointer user_data) { port_controls_t * port_controls; LADSPA_Data value; const char * str; char * endptr; GtkAdjustment * adjustment; guint copy; port_controls = (port_controls_t *) user_data; copy = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT(entry), "jack-rack-plugin-copy")); adjustment = gtk_range_get_adjustment (GTK_RANGE (port_controls->controls[copy].control)); str = gtk_entry_get_text (entry); value = strtof (str, &endptr); /* check for errors */ if (value == HUGE_VALF || value == -HUGE_VALF || endptr == str || value < (port_controls->logarithmic ? exp (adjustment->lower) : adjustment->lower) || value > (port_controls->logarithmic ? exp (adjustment->upper) : adjustment->upper)) { /* set the entry's text colour */ gtk_widget_set_text_colour (GTK_WIDGET(entry), "DarkRed"); return; } /* set the value in range */ gtk_range_set_value (GTK_RANGE(port_controls->controls[copy].control), port_controls->logarithmic ? log (value) : value); /* no need to set peers as the set_value above will do it */ gtk_widget_set_text_colour (GTK_WIDGET(entry), "Black"); } void control_bool_cb (GtkToggleButton * button, gpointer user_data) { port_controls_t * port_controls; gboolean on; LADSPA_Data data; int copy; port_controls = (port_controls_t *) user_data; on = gtk_toggle_button_get_active (button); data = on ? 1.0 : -1.0; /* get which channel we're using from the g object data stuff */ copy = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT(button), "jack-rack-plugin-copy")); port_control_send_value (port_controls, copy, data); /* possibly set other controls */ if (port_controls->plugin_slot->plugin->copies > 1 && port_controls->locked) { guint i; for (i = 0; i < port_controls->plugin_slot->plugin->copies; i++) if (i != copy) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(port_controls->controls[i].control), on); } } void control_int_cb (GtkSpinButton * spinbutton, gpointer user_data) { port_controls_t * port_controls; int value; LADSPA_Data data; int copy; port_controls = (port_controls_t *) user_data; value = gtk_spin_button_get_value_as_int (spinbutton); data = value; /* get which channel we're using from the g object data stuff */ copy = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT(spinbutton), "jack-rack-plugin-copy")); port_control_send_value (port_controls, copy, data); /* possibly set other controls */ if (port_controls->plugin_slot->plugin->copies > 1 && port_controls->locked) { guint i; for (i = 0; i < port_controls->plugin_slot->plugin->copies; i++) if (i != copy) gtk_spin_button_set_value (GTK_SPIN_BUTTON (port_controls->controls[i].control), value); } } void control_points_cb (GtkComboBox *combo, gpointer user_data) { port_controls_t * port_controls = (port_controls_t *) user_data; GtkTreeIter iter; GtkTreeModel *model; gfloat data; int copy; if (!gtk_combo_box_get_active_iter (combo, &iter)) { /* Nothing selected (yet). */ return; } model = gtk_combo_box_get_model (combo); gtk_tree_model_get (model, &iter, 1, &data, -1); /* get which channel we're using from the g object data stuff */ copy = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (combo), "jack-rack-plugin-copy")); port_control_send_value (port_controls, copy, data); /* possibly set other controls */ if (port_controls->plugin_slot->plugin->copies > 1 && port_controls->locked) { gint active = gtk_combo_box_get_active (combo); guint i; for (i = 0; i < port_controls->plugin_slot->plugin->copies; i++) if (i != copy) gtk_combo_box_set_active (GTK_COMBO_BOX (port_controls->controls[i].control), active); } } void control_lock_cb (GtkToggleButton * button, gpointer user_data) { port_controls_t * port_controls; gboolean locked; port_controls = (port_controls_t *) user_data; locked = gtk_toggle_button_get_active (button); port_control_set_locked (port_controls, locked); port_controls->lock_copy = 0; } /* EOF */ jack-rack-f9fb65d/src/control_callbacks.h000066400000000000000000000033311151220453700204660ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_CONTROL_CALLBACKS_H__ #define __JR_CONTROL_CALLBACKS_H__ #include "ac_config.h" #include gboolean control_button_press_cb (GtkWidget * widget, GdkEventButton * event, gpointer user_data); void control_lock_cb (GtkToggleButton * button, gpointer user_data); void control_float_cb (GtkRange * range, gpointer user_data); void control_float_text_cb (GtkEntry * entry, gpointer user_data); void control_bool_cb (GtkToggleButton * button, gpointer user_data); void control_int_cb (GtkSpinButton * spinbutton, gpointer user_data); void control_points_cb (GtkComboBox * combo, gpointer user_data); #ifdef HAVE_ALSA gboolean wet_dry_button_press_cb (GtkWidget * widget, GdkEventButton * event, gpointer user_data); void control_add_midi_cb (GtkMenuItem * menuitem, gpointer user_data); #endif #endif /* __JR_CONTROL_CALLBACKS_H__ */ jack-rack-f9fb65d/src/control_message.h000066400000000000000000000044631151220453700202020ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_CONTROL_MESSAGE_H__ #define __JR_CONTROL_MESSAGE_H__ #include "ac_config.h" #include #include /** These are for messages between the gui and the process() callback */ typedef enum _ctrlmsg_type { CTRLMSG_ADD, CTRLMSG_REMOVE, CTRLMSG_ABLE, CTRLMSG_ABLE_WET_DRY, CTRLMSG_MOVE, CTRLMSG_CHANGE, CTRLMSG_QUIT, #ifdef HAVE_ALSA CTRLMSG_MIDI_ADD, CTRLMSG_MIDI_REMOVE, CTRLMSG_MIDI_CTRL, CTRLMSG_MIDI_ABLE #endif } ctrlmsg_type_t; typedef struct _ctrlmsg ctrlmsg_t; struct _plugin; struct _plugin_desc; struct _plugin_slot; struct _midi_control; struct _ctrlmsg { ctrlmsg_type_t type; union { struct { struct _plugin * plugin; } add; struct { struct _plugin_slot * plugin_slot; struct _plugin * plugin; } remove; struct { struct _plugin_slot * plugin_slot; struct _plugin * plugin; gboolean enable; } ablise; struct { struct _plugin_slot * plugin_slot; struct _plugin * plugin; gboolean up; } move; struct { struct _plugin_slot * plugin_slot; struct _plugin * old_plugin; struct _plugin * new_plugin; } change; /* struct { struct _plugin * chain; } clear;*/ struct { struct _midi_control *midi_control; LADSPA_Data value; } midi; } data; }; #endif /* __JR_CONTROL_MESSAGE_H__ */ jack-rack-f9fb65d/src/file.c000066400000000000000000000374561151220453700157400ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2003 (node@users.sourceforge.net) * * 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. */ #define _GNU_SOURCE #include "ac_config.h" #ifdef HAVE_XML #include #include #include #include "file.h" #include "jack_rack.h" #include "globals.h" #include "plugin_settings.h" #include "control_message.h" xmlDocPtr jack_rack_create_doc (jack_rack_t * jack_rack) { xmlDocPtr doc; xmlNodePtr tree, jackrack, controlrow, wet_dry_values, midi_control; xmlDtdPtr dtd; plugin_slot_t * plugin_slot; GList * list; GSList *mlist; unsigned long control; unsigned long channel; gint copy; char num[32]; #ifdef HAVE_ALSA midi_control_t *midi_ctrl; #endif doc = xmlNewDoc(XML_DEFAULT_VERSION); /* dtd */ dtd = xmlNewDtd (doc, "jackrack", NULL, "http://jack-rack.sf.net/DTD/jack_rack_1.3.dtd"); doc->intSubset = dtd; xmlAddChild ((xmlNodePtr)doc, (xmlNodePtr)dtd); jackrack = xmlNewDocNode(doc, NULL, "jackrack", NULL); xmlAddChild ((xmlNodePtr)doc, jackrack); /* channels */ sprintf (num, "%ld", jack_rack->channels); xmlNewChild (jackrack, NULL, "channels", num); /* samplerate */ sprintf (num, "%ld", (long) sample_rate); xmlNewChild (jackrack, NULL, "samplerate", num); for (list = jack_rack->slots; list; list = g_list_next (list)) { plugin_slot = (plugin_slot_t *) list->data; tree = xmlNewChild (jackrack, NULL, "plugin", NULL); /* id */ sprintf (num, "%ld", plugin_slot->plugin->desc->id); xmlNewChild (tree, NULL, "id", num); /* enabled */ xmlNewChild (tree, NULL, "enabled", settings_get_enabled (plugin_slot->settings) ? "true" : "false"); /* wet/dry stuff */ xmlNewChild (tree, NULL, "wet_dry_enabled", settings_get_wet_dry_enabled (plugin_slot->settings) ? "true" : "false"); if (jack_rack->channels > 1) xmlNewChild (tree, NULL, "wet_dry_locked", settings_get_wet_dry_locked (plugin_slot->settings) ? "true" : "false"); /* wet/dry values */ wet_dry_values = xmlNewChild (tree, NULL, "wet_dry_values", NULL); for (channel = 0; channel < jack_rack->channels; channel++) { sprintf (num, "%f", settings_get_wet_dry_value (plugin_slot->settings, channel)); xmlNewChild (wet_dry_values, NULL, "value", num); } /* lockall */ if (plugin_slot->plugin->copies > 1 ) xmlNewChild (tree, NULL, "lockall", settings_get_lock_all (plugin_slot->settings) ? "true" : "false"); /* control rows */ for (control = 0; control < plugin_slot->plugin->desc->control_port_count; control++) { controlrow = xmlNewChild (tree, NULL, "controlrow", NULL); /* locked */ if (plugin_slot->plugin->copies > 1) xmlNewChild (controlrow, NULL, "lock", settings_get_lock (plugin_slot->settings, control) ? "true" : "false" ); /* plugin values */ for (copy = 0; copy < plugin_slot->plugin->copies; copy++) { sprintf (num, "%f", settings_get_control_value (plugin_slot->settings, copy, control)); xmlNewChild (controlrow, NULL, "value", num); } } /* midi control */ #ifdef HAVE_ALSA for (mlist = plugin_slot->midi_controls; mlist; mlist = g_slist_next (mlist)) { midi_ctrl = mlist->data; midi_control = xmlNewChild (tree, NULL, "midi_control", NULL); /* channel */ sprintf (num, "%d", midi_control_get_midi_channel (midi_ctrl)); xmlNewChild (midi_control, NULL, "midi_channel", num); /* param */ sprintf (num, "%d", midi_control_get_midi_param (midi_ctrl)); xmlNewChild (midi_control, NULL, "midi_param", num); /* minvalue */ sprintf (num, "%f", midi_control_get_min_value (midi_ctrl)); xmlNewChild (midi_control, NULL, "min_value", num); /* maxvalue */ sprintf (num, "%f", midi_control_get_max_value (midi_ctrl)); xmlNewChild (midi_control, NULL, "max_value", num); switch(midi_ctrl->ctrl_type) { case LADSPA_CONTROL: { xmlNodePtr ladspa; ladspa = xmlNewChild (midi_control, NULL, "ladspa", NULL); /* copy */ sprintf (num, "%d", midi_ctrl->control.ladspa.copy); xmlNewChild (ladspa, NULL, "copy", num); /* control */ sprintf (num, "%ld", midi_ctrl->control.ladspa.control); xmlNewChild (ladspa, NULL, "control", num); break; } case WET_DRY_CONTROL: { xmlNodePtr wet_dry; wet_dry = xmlNewChild (midi_control, NULL, "wet_dry", NULL); /* channel */ sprintf (num, "%ld", midi_ctrl->control.wet_dry.channel); xmlNewChild (wet_dry, NULL, "channel", num); break; } case PLUGIN_ENABLE_CONTROL: { xmlNodePtr enable; enable = xmlNewChild (midi_control, NULL, "enable", NULL); break; } } } #endif /* HAVE_ALSA */ } return doc; } int ui_save_file (ui_t * ui, const char * filename) { xmlDocPtr doc; int err; doc = jack_rack_create_doc (ui->jack_rack); err = xmlSaveFormatFile (filename, doc, TRUE); if (err == -1) ui_display_error (ui, E_ERROR, _("Could not save file '%s'"), filename); else err = 0; xmlFreeDoc (doc); return err; } static void saved_rack_parse_plugin (saved_rack_t * saved_rack, saved_plugin_t * saved_plugin, ui_t * ui, const char * filename, xmlNodePtr plugin) { plugin_desc_t * desc; settings_t * settings = NULL; xmlNodePtr node; xmlNodePtr sub_node; xmlChar *content; unsigned long num; unsigned long control = 0; #ifdef HAVE_ALSA midi_control_t * midi_ctrl; #endif for (node = plugin->children; node; node = node->next) { if (strcmp (node->name, "id") == 0) { content = xmlNodeGetContent (node); num = strtoul (content, NULL, 10); xmlFree (content); desc = plugin_mgr_get_any_desc (ui->plugin_mgr, num); if (!desc) { ui_display_error (ui, E_WARNING, _("The file '%s' contains an unknown plugin with ID '%ld'; skipping"), filename, num); return; } settings = settings_new (desc, saved_rack->channels, saved_rack->sample_rate); } else if (strcmp (node->name, "enabled") == 0) { content = xmlNodeGetContent (node); settings_set_enabled (settings, strcmp (content, "true") == 0 ? TRUE : FALSE); xmlFree (content); } else if (strcmp (node->name, "wet_dry_enabled") == 0) { content = xmlNodeGetContent (node); settings_set_wet_dry_enabled (settings, strcmp (content, "true") == 0 ? TRUE : FALSE); xmlFree (content); } else if (strcmp (node->name, "wet_dry_locked") == 0) { content = xmlNodeGetContent (node); settings_set_wet_dry_locked (settings, strcmp (content, "true") == 0 ? TRUE : FALSE); xmlFree (content); } else if (strcmp (node->name, "wet_dry_values") == 0) { unsigned long channel = 0; for (sub_node = node->children; sub_node; sub_node = sub_node->next) { if (strcmp (sub_node->name, "value") == 0) { content = xmlNodeGetContent (sub_node); settings_set_wet_dry_value (settings, channel, strtof (content, NULL)); xmlFree (content); channel++; } } } else if (strcmp (node->name, "lockall") == 0) { content = xmlNodeGetContent (node); settings_set_lock_all (settings, strcmp (content, "true") == 0 ? TRUE : FALSE); xmlFree (content); } else if (strcmp (node->name, "controlrow") == 0) { gint copy = 0; for (sub_node = node->children; sub_node; sub_node = sub_node->next) { if (strcmp (sub_node->name, "lock") == 0) { content = xmlNodeGetContent (sub_node); settings_set_lock (settings, control, strcmp (content, "true") == 0 ? TRUE : FALSE); xmlFree (content); } else if (strcmp (sub_node->name, "value") == 0) { content = xmlNodeGetContent (sub_node); settings_set_control_value (settings, copy, control, strtof (content, NULL)); xmlFree (content); copy++; } } control++; } #ifdef HAVE_ALSA else if (strcmp (node->name, "midi_control") == 0) { xmlNodePtr control_node; midi_ctrl = g_malloc (sizeof (midi_control_t)); midi_ctrl->min = -HUGE_VAL; midi_ctrl->max = HUGE_VAL; for (sub_node = node->children; sub_node; sub_node = sub_node->next) { if (strcmp (sub_node->name, "midi_channel") == 0) { content = xmlNodeGetContent (sub_node); midi_ctrl->midi_channel = atoi (content); xmlFree (content); } else if (strcmp (sub_node->name, "midi_param") == 0) { content = xmlNodeGetContent (sub_node); midi_ctrl->midi_param = atoi (content); xmlFree (content); } else if (strcmp (sub_node->name, "min_value") == 0) { content = xmlNodeGetContent (sub_node); midi_ctrl->min = atof (content); xmlFree (content); } else if (strcmp (sub_node->name, "max_value") == 0) { content = xmlNodeGetContent (sub_node); midi_ctrl->max = atof (content); xmlFree (content); } else if (strcmp (sub_node->name, "ladspa") == 0) { midi_ctrl->ctrl_type = LADSPA_CONTROL; for (control_node = sub_node->children; control_node; control_node = control_node->next) { if (strcmp (control_node->name, "copy") == 0) { content = xmlNodeGetContent (control_node); midi_ctrl->control.ladspa.copy = atoi (content); xmlFree (content); } else if (strcmp (control_node->name, "control") == 0) { content = xmlNodeGetContent (control_node); midi_ctrl->control.ladspa.control = strtoul (content, NULL, 10); xmlFree (content); } } } else if (strcmp (sub_node->name, "wet_dry") == 0) { midi_ctrl->ctrl_type = WET_DRY_CONTROL; for (control_node = sub_node->children; control_node; control_node = control_node->next) { if (strcmp (control_node->name, "channel") == 0) { content = xmlNodeGetContent (control_node); midi_ctrl->control.wet_dry.channel = strtoul (content, NULL, 10); xmlFree (content); } } } else if (strcmp (sub_node->name, "enable") == 0) { midi_ctrl->ctrl_type = PLUGIN_ENABLE_CONTROL; } } saved_plugin->midi_controls = g_slist_append (saved_plugin->midi_controls, midi_ctrl); } #endif /* HAVE_ALSA */ } if (settings) saved_plugin->settings = settings; } static void saved_rack_parse_jackrack (saved_rack_t * saved_rack, ui_t * ui, const char * filename, xmlNodePtr jackrack) { xmlNodePtr node; xmlChar *content; saved_plugin_t * saved_plugin; for (node = jackrack->children; node; node = node->next) { if (strcmp (node->name, "channels") == 0) { content = xmlNodeGetContent (node); saved_rack->channels = strtoul (content, NULL, 10); xmlFree (content); } else if (strcmp (node->name, "samplerate") == 0) { content = xmlNodeGetContent (node); saved_rack->sample_rate = strtoul (content, NULL, 10); xmlFree (content); } else if (strcmp (node->name, "plugin") == 0) { saved_plugin = g_malloc0 (sizeof (saved_plugin_t)); saved_rack->plugins = g_slist_append (saved_rack->plugins, saved_plugin); saved_rack_parse_plugin (saved_rack, saved_plugin, ui, filename, node); } } } static saved_rack_t * saved_rack_new (ui_t * ui, const char * filename, xmlDocPtr doc) { xmlNodePtr node; saved_rack_t *saved_rack; /* create the saved rack */ saved_rack = g_malloc (sizeof (saved_rack_t)); saved_rack->plugins = NULL; saved_rack->sample_rate = 48000; saved_rack->channels = 2; for (node = doc->children; node; node = node->next) { if (strcmp (node->name, "jackrack") == 0) saved_rack_parse_jackrack (saved_rack, ui, filename, node); } return saved_rack; } static void saved_rack_destroy (saved_rack_t * saved_rack) { g_free (saved_rack); } int ui_open_file (ui_t * ui, const char * filename) { xmlDocPtr doc; saved_rack_t * saved_rack; GSList * list; saved_plugin_t * saved_plugin; doc = xmlParseFile (filename); if (!doc) { ui_display_error (ui, E_ERROR, _("Could not parse file '%s'"), filename); return 1; } if (strcmp ( ((xmlDtdPtr)doc->children)->name, "jackrack") != 0) { ui_display_error (ui, E_ERROR, _("The file '%s' is not a JACK Rack settings file"), filename); return 1; } saved_rack = saved_rack_new (ui, filename, doc); xmlFreeDoc (doc); if (!saved_rack) return 1; if (ui->jack_rack->slots) { gboolean ok; ok = ui_get_ok (ui, _("The current rack will be cleared.\n\nAre you sure you want to continue?")); if (!ok) { saved_rack_destroy (saved_rack); return 1; } } if (saved_rack->channels != ui->jack_rack->channels) ui_set_channels (ui, saved_rack->channels); jack_rack_send_clear_plugins (ui->jack_rack); for (list = saved_rack->plugins; list; list = g_slist_next (list)) { saved_plugin = list->data; settings_set_sample_rate (saved_plugin->settings, sample_rate); jack_rack_add_saved_plugin (ui->jack_rack, saved_plugin); } g_slist_free (saved_rack->plugins); g_free (saved_rack); return 0; } #endif /* HAVE_XML */ /* EOF */ jack-rack-f9fb65d/src/file.h000066400000000000000000000025271151220453700157340ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_FILE_H__ #define __JR_FILE_H__ #include "ac_config.h" /* * all setups needs this */ #include #include "plugin_settings.h" typedef struct _saved_plugin saved_plugin_t; struct _saved_plugin { settings_t *settings; GSList * midi_controls; }; #ifdef HAVE_XML #include #include "ui.h" typedef struct _saved_rack saved_rack_t; struct _saved_rack { unsigned long channels; jack_nframes_t sample_rate; GSList * plugins; }; #endif /* HAVE_XML */ #endif /* __JR_FILE_H__ */ jack-rack-f9fb65d/src/globals.h000066400000000000000000000042041151220453700164320ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JLH_GLOBALS_H__ #define __JLH_GLOBALS_H__ #include #include "ac_config.h" #ifdef HAVE_LASH #include extern lash_client_t * global_lash_client; #endif #define JACK_RACK_LOGO_FILE "jack-rack-logo.png" #define JACK_RACK_ICON_FILE "jack-rack-icon.png" #define JACK_RACK_CHANNELS_ICON_FILE "gnome-mixer-small.png" #define JACK_RACK_URL "http://jack-rack.sourceforge.net/" #define set_string_property(property, value) \ \ if (property) \ g_free (property); \ \ if (value) \ (property) = g_strdup (value); \ else \ (property) = NULL; #ifdef ENABLE_NLS # include # define _(x) dgettext(PACKAGE, x) #else # define _(x) x #endif #define N_(x) x extern struct _ui *global_ui; extern gboolean connect_inputs; extern gboolean connect_outputs; extern gboolean time_runs; extern GString *client_name; extern GString *session_uuid; extern GString *initial_filename; typedef enum MIDI_CONTROL_TYPE { LADSPA_CONTROL, WET_DRY_CONTROL, PLUGIN_ENABLE_CONTROL } midi_control_type_t; #define COPYRIGHT_MESSAGE \ "Copyright (C) 2002, 2003 Robert Ham \n" \ "Copyright (C) 2005, 2006 Leslie P. Polzer \n" \ "Copyright (C) 2006, 2007 Adam Sampson " #endif /* __JLH_GLOBALS_H__ */ jack-rack-f9fb65d/src/jack_rack.c000066400000000000000000000216011151220453700167120ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #include "ac_config.h" #include #include #include #include #include #include #include #include "jack_rack.h" #include "lock_free_fifo.h" #include "control_message.h" #include "globals.h" #include "ui.h" #include "file.h" jack_rack_t * jack_rack_new (ui_t * ui, unsigned long channels) { jack_rack_t *rack; rack = g_malloc (sizeof (jack_rack_t)); rack->slots = NULL; rack->saved_plugins = NULL; rack->ui = ui; rack->channels = channels; return rack; } void jack_rack_destroy (jack_rack_t * jack_rack) { g_free (jack_rack); } plugin_t * jack_rack_instantiate_plugin (jack_rack_t * jack_rack, plugin_desc_t * desc) { plugin_t * plugin; /* check whether or not the plugin is RT capable and confirm with the user if it isn't */ if (!LADSPA_IS_HARD_RT_CAPABLE(desc->properties)) { GtkWidget * dialog; gint response; dialog = gtk_message_dialog_new (GTK_WINDOW(jack_rack->ui->main_window), GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO, _("Plugin not RT capable\n\nThe plugin '%s' does not describe itself as being capable of real-time operation. If you use it, you may experience drop-outs or unexpected disconnection from JACK.\n\nAre you sure you want to add this plugin?"), desc->name); response = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); if (response != GTK_RESPONSE_YES) { return NULL; } } /* create the plugin */ plugin = plugin_new (desc, jack_rack); if (!plugin) { GtkWidget * dialog; dialog = gtk_message_dialog_new (GTK_WINDOW(jack_rack->ui->main_window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Error loading file plugin '%s' from file '%s'"), desc->name, desc->object_file); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); return NULL; } return plugin; } void jack_rack_send_add_plugin (jack_rack_t * jack_rack, plugin_desc_t * desc) { plugin_t * plugin; ctrlmsg_t ctrlmsg; plugin = jack_rack_instantiate_plugin (jack_rack, desc); if (!plugin) return; /* send the chain link off to the process() callback */ ctrlmsg.type = CTRLMSG_ADD; ctrlmsg.data.add.plugin = plugin; lff_write (jack_rack->ui->ui_to_process, &ctrlmsg); } void jack_rack_add_saved_plugin (jack_rack_t * jack_rack, saved_plugin_t * saved_plugin) { jack_rack->saved_plugins = g_slist_append (jack_rack->saved_plugins, saved_plugin); jack_rack_send_add_plugin (jack_rack, saved_plugin->settings->desc); } void jack_rack_add_plugin (jack_rack_t * jack_rack, plugin_t * plugin) { plugin_slot_t *plugin_slot; saved_plugin_t * saved_plugin = NULL; GSList * list; /* see if there's any saved settings that match the plugin id */ for (list = jack_rack->saved_plugins; list; list = g_slist_next (list)) { saved_plugin = list->data; if (saved_plugin->settings->desc->id == plugin->desc->id) { jack_rack->saved_plugins = g_slist_remove (jack_rack->saved_plugins, saved_plugin); break; } saved_plugin = NULL; } /* create the plugin_slot */ plugin_slot = plugin_slot_new (jack_rack, plugin, saved_plugin); jack_rack->slots = g_list_append (jack_rack->slots, plugin_slot); plugin_slot_send_ablise (plugin_slot, settings_get_enabled (plugin_slot->settings)); plugin_slot_send_ablise_wet_dry (plugin_slot, settings_get_wet_dry_enabled (plugin_slot->settings)); gtk_box_pack_start (GTK_BOX (jack_rack->ui->plugin_box), plugin_slot->main_vbox, FALSE, FALSE, 0); } void jack_rack_send_remove_plugin_slot (jack_rack_t *jack_rack, plugin_slot_t *plugin_slot) { ctrlmsg_t ctrlmsg; #ifdef HAVE_ALSA plugin_slot_remove_midi_controls (plugin_slot); #endif ctrlmsg.type = CTRLMSG_REMOVE; ctrlmsg.data.remove.plugin = plugin_slot->plugin; ctrlmsg.data.remove.plugin_slot = plugin_slot; lff_write (jack_rack->ui->ui_to_process, &ctrlmsg); } void jack_rack_remove_plugin_slot (jack_rack_t * jack_rack, plugin_slot_t * plugin_slot) { jack_rack->slots = g_list_remove (jack_rack->slots, plugin_slot); plugin_slot_destroy (plugin_slot); } void jack_rack_send_move_plugin_slot (jack_rack_t * jack_rack, plugin_slot_t * plugin_slot, gint up) { ctrlmsg_t ctrlmsg; GList * slot_list_data; /* this is because we use indices */ if (ui_get_state (jack_rack->ui) == STATE_RACK_CHANGE) return; slot_list_data = g_list_find (global_ui->jack_rack->slots, plugin_slot); /* check the logic of what we're doing */ if ((up && !g_list_previous (slot_list_data)) || (!up && !g_list_next (slot_list_data))) return; ui_set_state (global_ui, STATE_RACK_CHANGE); ctrlmsg.type = CTRLMSG_MOVE; ctrlmsg.data.move.plugin = plugin_slot->plugin; ctrlmsg.data.move.up = up; ctrlmsg.data.move.plugin_slot = plugin_slot; lff_write (jack_rack->ui->ui_to_process, &ctrlmsg); } void jack_rack_move_plugin_slot (jack_rack_t * jack_rack, plugin_slot_t * plugin_slot, gint up) { gint index; index = g_list_index (jack_rack->slots, plugin_slot); jack_rack->slots = g_list_remove (jack_rack->slots, plugin_slot); if (up) index--; else index++; jack_rack->slots = g_list_insert (jack_rack->slots, plugin_slot, index); gtk_box_reorder_child (GTK_BOX (jack_rack->ui->plugin_box), plugin_slot->main_vbox, index); } void jack_rack_change_plugin_slot (jack_rack_t * jack_rack, plugin_slot_t * plugin_slot, plugin_t * plugin) { plugin_slot_change_plugin (plugin_slot, plugin); } void jack_rack_send_clear_plugins (jack_rack_t * jack_rack) { GList * slot; for (slot = jack_rack->slots; slot; slot = g_list_next (slot)) jack_rack_send_remove_plugin_slot (jack_rack, (plugin_slot_t *) slot->data); } plugin_slot_t * jack_rack_get_plugin_slot (jack_rack_t * jack_rack, unsigned long plugin_index) { return (plugin_slot_t *) g_list_nth_data (jack_rack->slots, plugin_index); } #ifdef HAVE_ALSA unsigned int jack_rack_get_next_midi_param (jack_rack_t * jack_rack, unsigned char channel) { plugin_slot_t *plugin_slot; midi_control_t *midi_ctrl; GList *slot; GList *next_slot; GSList *control; unsigned int param = 1; for (slot = jack_rack->slots; slot; slot = next_slot) { next_slot = g_list_next (slot); plugin_slot = slot->data; for (control = plugin_slot->midi_controls; control; control = g_slist_next (control)) { midi_ctrl = control->data; if (midi_control_get_midi_channel (midi_ctrl) == channel && midi_control_get_midi_param (midi_ctrl) == param) { param++; next_slot = jack_rack->slots; break; } } } g_assert (param < 129); return param; } #endif /* HAVE_ALSA */ /* EOF */ jack-rack-f9fb65d/src/jack_rack.h000066400000000000000000000046561151220453700167320ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_JACK_RACK_H__ #define __JR_JACK_RACK_H__ #include "ac_config.h" #include #include #include "plugin.h" #include "plugin_mgr.h" #include "plugin_slot.h" typedef struct _jack_rack jack_rack_t; struct _jack_rack { struct _ui * ui; unsigned long channels; GList * slots; GSList * saved_plugins; }; jack_rack_t * jack_rack_new (struct _ui * ui, unsigned long channels); void jack_rack_destroy (jack_rack_t * jack_rack); void jack_rack_send_add_plugin (jack_rack_t * jack_rack, plugin_desc_t * plugin); void jack_rack_add_plugin (jack_rack_t * jack_rack, plugin_t * plugin); void jack_rack_add_saved_plugin (jack_rack_t * jack_rack, struct _saved_plugin * saved_plugin); void jack_rack_send_remove_plugin_slot (jack_rack_t *jack_rack, plugin_slot_t *plugin_slot); void jack_rack_remove_plugin_slot (jack_rack_t * jack_rack, plugin_slot_t * plugin_slot); void jack_rack_send_move_plugin_slot (jack_rack_t * jack_rack, plugin_slot_t * plugin_slot, gint up); void jack_rack_move_plugin_slot (jack_rack_t * jack_rack, plugin_slot_t * plugin_slot, gint up); void jack_rack_change_plugin_slot (jack_rack_t * jack_rack, plugin_slot_t * plugin_slot, plugin_t * plugin); void jack_rack_send_clear_plugins (jack_rack_t * jack_rack); plugin_slot_t * jack_rack_get_plugin_slot (jack_rack_t * jack_rack, unsigned long plugin_index); plugin_t * jack_rack_instantiate_plugin (jack_rack_t * jack_rack, plugin_desc_t * desc); #ifdef HAVE_ALSA unsigned int jack_rack_get_next_midi_param (jack_rack_t * jack_rack, unsigned char channel); #endif #endif /* __JR_JACK_RACK_H__ */ jack-rack-f9fb65d/src/jack_rack_1.0.dtd000066400000000000000000000005711151220453700176240ustar00rootroot00000000000000 jack-rack-f9fb65d/src/jack_rack_1.1.dtd000066400000000000000000000011461151220453700176240ustar00rootroot00000000000000 jack-rack-f9fb65d/src/jack_rack_1.2.dtd000066400000000000000000000017141151220453700176260ustar00rootroot00000000000000 jack-rack-f9fb65d/src/jack_rack_1.3.dtd000066400000000000000000000020541151220453700176250ustar00rootroot00000000000000 jack-rack-f9fb65d/src/lock_free_fifo.c000066400000000000000000000056721151220453700177500ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #include #include #include #include #include "lock_free_fifo.h" /** initialise a lock free fifo */ void lff_init (lff_t * lff, unsigned int size, size_t object_size) { lff->size = size; lff->object_size = object_size; lff->read_index = 0; lff->write_index = 0; lff->data = g_malloc (object_size * size); } lff_t * lff_new (unsigned int size, size_t object_size) { lff_t * lff; lff = g_malloc (sizeof (lff_t)); lff_init (lff, size, object_size); return lff; } void lff_free (lff_t * lff) { g_free (lff->data); } void lff_destroy (lff_t * lff) { lff_free (lff); g_free (lff); } /** read an element from the fifo into data. returns 0 on success, non-zero if there were no elements to read */ int lff_read (lff_t * lff, void * data) { if (lff->read_index == lff->write_index) { return -1; } else { memcpy (data, ((char *)lff->data) + (lff->read_index * lff->object_size), lff->object_size); lff->read_index++; if (lff->read_index >= lff->size) { lff->read_index = 0; } return 0; } } /** write an element from data to the fifo. returns 0 on success, non-zero if there was no space */ int lff_write (lff_t * lff, void * data) { static unsigned int ri; /* got to read read_index only once for safety */ ri = lff->read_index; /* lots of logic for when we're allowed to write to the fifo which basically boils down to "don't write if we're one element behind the read index" */ if ((ri > lff->write_index && ri - lff->write_index > 1) || (lff->write_index >= ri && lff->write_index != lff->size - 1) || (lff->write_index >= ri && lff->write_index == lff->size - 1 && ri != 0)) { /* if ((ri > lff->write_index && ri - lff->write_index > 1) || (lff->write_index >= ri && (lff->write_index != lff->size - 1 || ri != 0))) { */ memcpy (((char *)lff->data) + (lff->write_index * lff->object_size), data, lff->object_size); /* FIXME: is this safe? */ lff->write_index++; if (lff->write_index >= lff->size) { lff->write_index = 0; } return 0; } else { return -1; } } jack-rack-f9fb65d/src/lock_free_fifo.h000066400000000000000000000032061151220453700177440ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JLH_LOCK_FREE_FIFO_H__ #define __JLH_LOCK_FREE_FIFO_H__ /** lock free fifo ring buffer structure */ typedef struct lock_free_fifo { /** Size of the ringbuffer (in elements) */ unsigned int size; /** the memory containing the ringbuffer */ void * data; /** the size of an element */ size_t object_size; /** the current position of the reader */ unsigned int read_index; /** the current position of the writer */ unsigned int write_index; } lff_t; void lff_init (lff_t * lff, unsigned int size, size_t object_size); void lff_free (lff_t * lff); lff_t * lff_new (unsigned int size, size_t object_size); void lff_destroy (lff_t * lock_free_fifo); int lff_read (lff_t * lock_free_fifo, void * data); int lff_write (lff_t * lock_free_fifo, void * data); #endif /* __JLH_LOCK_FREE_FIFO_H__ */ jack-rack-f9fb65d/src/main.c000066400000000000000000000153211151220453700157300ustar00rootroot00000000000000/* * jack-ladspa-host * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #include "ac_config.h" #include #define _GNU_SOURCE #include #undef _GNU_SOURCE #include #include #include #include #include #include #include #ifdef HAVE_GNOME #include #include #endif #ifdef HAVE_XML #include #define XML_COMPRESSION_LEVEL 5 #endif #include "ui.h" #include "globals.h" ui_t * global_ui = NULL; gboolean connect_inputs = FALSE; gboolean connect_outputs = FALSE; gboolean time_runs = TRUE; GString *client_name = NULL; GString *session_uuid = NULL; GString *initial_filename = NULL; #ifdef HAVE_LASH lash_client_t * global_lash_client; #endif #define CLIENT_NAME_BASE "JACK Rack" void print_help (void) { printf("%s version %s\n", PACKAGE_NAME, PACKAGE_VERSION); printf("%s\n", COPYRIGHT_MESSAGE); printf("\n"); printf("This program comes with ABSOLUTELY NO WARRANTY. You are licensed to use it\n"); printf("under the terms of the GNU General Public License, version 2 or later. See\n"); printf("the COPYING file that came with this software for details.\n"); printf("\n"); printf(_("Compiled with:\n")); printf( " JACK %s\n", JACK_VERSION); #ifdef HAVE_ALSA printf( " ALSA %s\n", ALSA_VERSION); #endif #ifdef HAVE_LASH printf( " LASH %s\n", LASH_VERSION); #endif #ifdef HAVE_XML printf( " libxml2 %s\n", XML_VERSION); #endif #ifdef HAVE_GNOME printf( " GNOME %s\n", GNOME_VERSION); #endif printf("\n"); printf(_("Usage: jack-rack [OPTION]...")); #ifdef HAVE_XML printf(" [file]\n"); #else printf("\n"); #endif /* HAVE_XML */ printf("\n"); printf(" -h, --help %s\n", _("Display this help info")); printf("\n"); printf(" -p, --pid-name %s\n", _("Use the pid in the JACK client name (default)")); printf(" -s, --string-name %s\n", _("Use in the JACK client name")); printf(" -n, --name %s\n", _("Use just jack_rack as the client name")); printf("\n"); printf(" -i, --input %s\n", _("Connected inputs to the first two physical capture ports")); printf(" -o, --output %s\n", _("Connected outputs to the first two physical playback ports")); printf(" -c, --channels %s\n", _("How many input and output channels the rack should use (default: 2)")); /* printf(" -t, --no-time %s\n", _("Do not display plugins' execution time")); */ printf("\n"); } int main (int argc, char ** argv) { unsigned long channels = 2; int opt; const char * options = "hps:ionc:tD:"; struct option long_options[] = { { "help", 0, NULL, 'h' }, { "pid-name", 0, NULL, 'p' }, { "string-name", 1, NULL, 's' }, { "name", 1, NULL, 'n' }, { "channels", 1, NULL, 'c' }, { "input", 1, NULL, 'i' }, { "output", 1, NULL, 'o' }, { "no-time", 0, NULL, 't' }, { "jack-session-uuid", 1, NULL, 'U' }, { 0, 0, 0, 0 } }; #ifdef HAVE_LASH lash_args_t * lash_args; lash_event_t * lash_event; #endif gtk_set_locale (); #ifdef ENABLE_NLS bindtextdomain (PACKAGE, LOCALEDIR); bind_textdomain_codeset (PACKAGE, "UTF-8"); #endif /* not using gnome popt */ for (opt = 1; opt < argc; opt++) { if (strcmp (argv[opt], "-h") == 0 || strcmp (argv[opt], "--help") == 0) { print_help (); exit (0); } } #ifdef HAVE_LASH lash_args = lash_extract_args (&argc, &argv); #endif gtk_init (&argc, &argv); #ifdef HAVE_GNOME gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv, NULL); #endif /* set the client name */ client_name = g_string_new (""); session_uuid = g_string_new (""); g_string_printf (client_name, "%s", CLIENT_NAME_BASE); while ((opt = getopt_long (argc, argv, options, long_options, NULL)) != -1) { switch (opt) { case 'h': print_help (); exit (0); break; case 's': g_string_printf (client_name, "%s (%s)", CLIENT_NAME_BASE, optarg); break; case 'p': g_string_printf (client_name, "%s (%d)", CLIENT_NAME_BASE, getpid()); break; case 'n': g_string_printf (client_name, CLIENT_NAME_BASE); break; case 'i': connect_inputs = TRUE; break; case 'o': connect_outputs = TRUE; break; case 'c': channels = atof (optarg); if (channels < 1) { fprintf (stderr, _("There must be at least one channel\n")); exit (EXIT_FAILURE); } break; case 't': time_runs = FALSE; break; case 'U': g_string_printf (session_uuid, "%s", optarg); break; case ':': case '?': print_help (); exit (EXIT_FAILURE); break; } } #ifdef HAVE_XML if (optind < argc) { if (argc - optind > 1) { fprintf (stderr, _("Please specify only one file to open")); exit(EXIT_FAILURE); } initial_filename = g_string_new(argv[optind]); } #endif /* HAVE_XML */ #ifdef HAVE_LASH { int flags = LASH_Config_File; global_lash_client = lash_init (lash_args, PACKAGE_NAME, flags, LASH_PROTOCOL (2,0)); } if (global_lash_client) { lash_event = lash_event_new_with_type (LASH_Client_Name); lash_event_set_string (lash_event, client_name->str); lash_send_event (global_lash_client, lash_event); } #endif /* HAVE_LASH */ #ifdef HAVE_XML xmlSetCompressMode (XML_COMPRESSION_LEVEL); #endif global_ui = ui_new (channels); if (!global_ui) return 1; /* ignore the sighup (the jack client thread needs to deal with it) */ signal (SIGHUP, SIG_IGN); /* jack_activate (global_ui->procinfo->jack_client); */ gtk_main (); /* jack_deactivate (global_ui->procinfo->jack_client); */ ui_destroy (global_ui); return 0; } jack-rack-f9fb65d/src/midi.c000066400000000000000000000255221151220453700157320ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2003 (node@users.sourceforge.net) * * 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. */ #include "ac_config.h" #ifdef HAVE_ALSA #define _GNU_SOURCE #include #include #include #include #include #include "globals.h" #include "midi.h" #include "ui.h" #include "control_message.h" static void * midi_run (void * data); static snd_seq_t * midi_info_connect_alsa (ui_t * ui) { snd_seq_t * seq; int err; ui_display_splash_text (ui, _("Connecting to ALSA sequencer")); /* connect to the sequencer */ err = snd_seq_open(&seq, "default", SND_SEQ_OPEN_DUPLEX, 0); if (err) ui_display_error (ui, E_FATAL, _("Could not open ALSA sequencer, aborting:\n\n%s\n\nPlease check that your ALSA configuration is correct."), snd_strerror (err)); ui_display_splash_text (ui, _("Connected to ALSA sequencer with id %d"), snd_seq_client_id (seq)); /* tell LASH our client id */ #ifdef HAVE_LASH lash_alsa_client_id (global_lash_client, snd_seq_client_id (seq)); #endif /* HAVE_LASH */ /* set our client name */ snd_seq_set_client_name (seq, client_name->str); ui_display_splash_text (ui, _("Creating ALSA sequencer port")); /* create a port */ err = snd_seq_create_simple_port (seq, "Control", SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_WRITE|SND_SEQ_PORT_CAP_DUPLEX| SND_SEQ_PORT_CAP_SUBS_READ|SND_SEQ_PORT_CAP_SUBS_WRITE, SND_SEQ_PORT_TYPE_APPLICATION|SND_SEQ_PORT_TYPE_SPECIFIC); if (err) ui_display_error (ui, E_FATAL, _("Could not create ALSA port, aborting:\n\n%s"), snd_strerror (err)); ui_display_splash_text (ui, _("Created ALSA sequencer port")); return seq; } midi_info_t * midi_info_new (struct _ui * ui) { midi_info_t * minfo; minfo = g_malloc (sizeof (midi_info_t)); minfo->ui = ui; minfo->seq = midi_info_connect_alsa (ui); minfo->midi_to_ui = ui->midi_to_ui; minfo->ui_to_midi = ui->ui_to_midi; minfo->midi_controls = NULL; minfo->quit = FALSE; pthread_create (&minfo->thread, NULL, midi_run, minfo); return minfo; } void midi_info_destroy (midi_info_t * minfo) { minfo->quit = TRUE; pthread_join (minfo->thread, NULL); g_free (minfo); } static void midi_send_control (midi_info_t *minfo, midi_control_t *midi_ctrl, LADSPA_Data value) { snd_seq_event_t event; signed int midi_value; int err; midi_value = 128 / ((midi_ctrl->max - midi_ctrl->min) / (value - midi_ctrl->min)); snd_seq_ev_clear (&event); snd_seq_ev_set_direct (&event); snd_seq_ev_set_subs (&event); snd_seq_ev_set_source (&event, 0); snd_seq_ev_set_controller (&event, midi_control_get_midi_channel (midi_ctrl) - 1, midi_control_get_midi_param (midi_ctrl), midi_value); err = snd_seq_event_output (minfo->seq, &event); if (err < 0) { fprintf (stderr, _("%s: error sending MIDI event: %s\n"), __FUNCTION__, snd_strerror (err)); } snd_seq_drain_output (minfo->seq); } static void midi_process_ctrlmsgs (midi_info_t *minfo) { ctrlmsg_t ctrlmsg; while (lff_read (minfo->ui_to_midi, &ctrlmsg) == 0) { switch (ctrlmsg.type) { case CTRLMSG_MIDI_ADD: minfo->midi_controls = g_slist_append (minfo->midi_controls, ctrlmsg.data.midi.midi_control); lff_write (minfo->midi_to_ui, &ctrlmsg); break; case CTRLMSG_MIDI_REMOVE: minfo->midi_controls = g_slist_remove (minfo->midi_controls, ctrlmsg.data.midi.midi_control); lff_write (minfo->midi_to_ui, &ctrlmsg); break; case CTRLMSG_MIDI_CTRL: case CTRLMSG_MIDI_ABLE: midi_send_control (minfo, ctrlmsg.data.midi.midi_control, ctrlmsg.data.midi.value); break; case CTRLMSG_QUIT: minfo->quit = TRUE; break; default: break; } } } static void midi_control (midi_info_t *minfo, snd_seq_ev_ctrl_t *event, snd_seq_event_type_t type) { GSList *list; midi_control_t *midi_ctrl; LADSPA_Data value; ctrlmsg_t ctrlmsg; for (list = minfo->midi_controls; list; list = g_slist_next (list)) { midi_ctrl = (midi_control_t *) list->data; int param = midi_control_get_midi_param (midi_ctrl); int channel = midi_control_get_midi_channel (midi_ctrl); /* Note: this might seem a bit swilly, but it was useful for me to be able to use program change events to toggle the enabled state. (my midi controller only had 12 controller change triggers, but 120 program change triggers...) Might be useful for others too.... Hopefully, not too confusing though. */ if ( ( (type == SND_SEQ_EVENT_CONTROLLER || type == SND_SEQ_EVENT_CONTROL14) && event->param == param && event->channel+1 == channel ) /* control change */ || ( type == SND_SEQ_EVENT_PGMCHANGE && event->value == param ) ) /* prog change stores our 'param' in 'value'. ignore channel. */ { int value_max = (type == SND_SEQ_EVENT_CONTROLLER) ? 127 : 16383; value = midi_ctrl->min + ((midi_ctrl->max - midi_ctrl->min) / ((LADSPA_Data) value_max)) * event->value; /* send the value to the process callback */ if(midi_ctrl->ctrl_type != PLUGIN_ENABLE_CONTROL) { if (!midi_control_get_locked (midi_ctrl)) lff_write (midi_ctrl->fifo, &value); else { unsigned long i; unsigned long limit = midi_ctrl->ctrl_type == LADSPA_CONTROL ? midi_ctrl->plugin_slot->plugin->desc->control_port_count : midi_ctrl->plugin_slot->jack_rack->channels; for (i = 0; i < limit; i++) lff_write (midi_ctrl->fifos + i, &value); } /* FIXME: need to send to all copies * number of channels is in minfo->ui->jack_rack->channels * (midi_control.midi_channel) */ /* send the value to the ui */ ctrlmsg.type = CTRLMSG_MIDI_CTRL; ctrlmsg.data.midi.midi_control = midi_ctrl; ctrlmsg.data.midi.value = value; lff_write (minfo->midi_to_ui, &ctrlmsg); } else { /* This is an 'Enable' midi message */ plugin_t * plugin; /* TODO: add fifo */ plugin = midi_ctrl->plugin_slot->plugin; /* For control change, off = 0, on = value_max. For prog change, just flip the state */ if(type == SND_SEQ_EVENT_CONTROLLER || type == SND_SEQ_EVENT_CONTROL14) { if(event->value == 0) plugin->enabled = FALSE; else if(event->value == value_max) plugin->enabled = TRUE; else return; } else if(type == SND_SEQ_EVENT_PGMCHANGE) { gboolean wasEnabled = plugin->enabled; plugin->enabled = !wasEnabled; } ctrlmsg.type = CTRLMSG_MIDI_ABLE; ctrlmsg.data.ablise.plugin = plugin; ctrlmsg.data.ablise.enable = plugin->enabled; ctrlmsg.data.ablise.plugin_slot = midi_ctrl->plugin_slot; lff_write (minfo->midi_to_ui, &ctrlmsg); } } } } /** * Check for new events in the sequencer's event queue */ static void midi_get_events (midi_info_t *minfo) { snd_seq_event_t *event; do { snd_seq_event_input (minfo->seq, &event); switch (event->type) { case SND_SEQ_EVENT_CONTROLLER: case SND_SEQ_EVENT_CONTROL14: case SND_SEQ_EVENT_PGMCHANGE: midi_control (minfo, &event->data.control, event->type); break; default: break; } } while (snd_seq_event_input_pending (minfo->seq, 0) > 0); } /** * Poll the sequencer's file descriptors */ static void midi_process (midi_info_t *minfo) { int err; int i; err = poll (minfo->pfds, minfo->seq_nfds, 300); if (err > 0) for (i = 0; i < minfo->seq_nfds; i++) if (minfo->pfds[i].revents > 0) midi_get_events (minfo); } static void midi_realise_time (midi_info_t *minfo) { pthread_t jack_thread; struct sched_param rt_param; gboolean set_priority = FALSE; int policy; int err; memset(&rt_param, 0, sizeof(rt_param)); jack_thread = jack_client_thread_id (minfo->ui->procinfo->jack_client); err = pthread_getschedparam (jack_thread, &policy, &rt_param); if (err) fprintf (stderr, _("%s: could not get scheduling parameters of JACK thread: %s\n"), __FUNCTION__, strerror (err)); else { rt_param.sched_priority += 1; set_priority = TRUE; } /* make a guess; jackd runs at priority 10 by default I think */ if (!set_priority) { memset(&rt_param, 0, sizeof(rt_param)); rt_param.sched_priority = 15; } policy = SCHED_FIFO; err = pthread_setschedparam (pthread_self (), policy, &rt_param); if (err) fprintf (stderr, _("%s: could not set SCHED_FIFO for MIDI thread: %s\n"), __FUNCTION__, strerror (errno)); } static void * midi_run (void * data) { midi_info_t * minfo = (midi_info_t *) data; /* this is dealt with by the JACK thread */ signal (SIGHUP, SIG_IGN); midi_realise_time (minfo); minfo->seq_nfds = snd_seq_poll_descriptors_count(minfo->seq, POLLIN); minfo->pfds = g_malloc (sizeof(struct pollfd) * minfo->seq_nfds); snd_seq_poll_descriptors(minfo->seq, minfo->pfds, minfo->seq_nfds, POLLIN); while (!minfo->quit) { midi_process (minfo); midi_process_ctrlmsgs (minfo); } g_free (minfo->pfds); return NULL; } #endif /* HAVE_ALSA */ jack-rack-f9fb65d/src/midi.h000066400000000000000000000027561151220453700157430ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2003 (node@users.sourceforge.net) * * 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. */ #include "ac_config.h" #ifdef HAVE_ALSA #ifndef __JR_MIDI_H__ #define __JR_MIDI_H__ #include #include #include #include "lock_free_fifo.h" #include "midi_control.h" typedef struct _midi_info midi_info_t; struct _ui; struct _midi_info { pthread_t thread; gboolean quit; struct _ui *ui; snd_seq_t *seq; int seq_nfds; struct pollfd *pfds; lff_t *midi_to_ui; lff_t *ui_to_midi; GSList *midi_controls; }; struct _ui; midi_info_t * midi_info_new (struct _ui * ui); void midi_info_destroy (midi_info_t * minfo); #endif /* __JR_MIDI_H__ */ #endif /* HAVE_ALSA */ jack-rack-f9fb65d/src/midi_control.c000066400000000000000000000215051151220453700174670ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2003 (node@users.sourceforge.net) * * 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. */ #include "ac_config.h" #ifdef HAVE_ALSA #include #include #include #include "midi_control.h" #include "plugin_slot.h" static midi_control_t * midi_control_new (plugin_slot_t * plugin_slot) { midi_control_t * midi_ctrl; midi_ctrl = g_malloc0 (sizeof (midi_control_t)); midi_ctrl->plugin_slot = plugin_slot; pthread_mutex_init (&midi_ctrl->locked_lock, NULL); pthread_mutex_init (&midi_ctrl->midi_channel_lock, NULL); pthread_mutex_init (&midi_ctrl->midi_param_lock, NULL); return midi_ctrl; } midi_control_t * ladspa_midi_control_new (plugin_slot_t * plugin_slot, guint copy, unsigned long control) { midi_control_t *midi_ctrl; port_controls_t * port_controls; midi_ctrl = midi_control_new (plugin_slot); port_controls = plugin_slot->port_controls + control; midi_ctrl->fifo = plugin_slot->plugin->holders[copy].midi_control_fifos + control; midi_ctrl->fifos = plugin_slot->plugin->holders[copy].midi_control_fifos; midi_ctrl->ctrl_type = LADSPA_CONTROL; midi_ctrl->control.ladspa.control = control; midi_ctrl->control.ladspa.copy = copy; if (port_controls->type == JR_CTRL_BOOL) { midi_ctrl->min = 0.0; midi_ctrl->max = 1.0; } else if (port_controls->type == JR_CTRL_POINTS) { GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (port_controls->controls[copy].control)); GtkTreeIter iter; gboolean is_first = TRUE, valid; gtk_tree_model_get_iter_first (model, &iter); do { gfloat value; gtk_tree_model_get (model, &iter, 1, &value, -1); if (is_first || value < midi_ctrl->min) midi_ctrl->min = value; if (is_first || value > midi_ctrl->max) midi_ctrl->max = value; is_first = FALSE; valid = gtk_tree_model_iter_next (model, &iter); } while (valid); } else { GtkAdjustment *adjustment; if (port_controls->type == JR_CTRL_INT) adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (port_controls->controls[copy].control)); else adjustment = gtk_range_get_adjustment (GTK_RANGE (port_controls->controls[copy].control)); midi_ctrl->min = adjustment->lower; midi_ctrl->max = adjustment->upper; if (port_controls->type == JR_CTRL_FLOAT && port_controls->logarithmic) { midi_ctrl->min = exp (midi_ctrl->min); midi_ctrl->max = exp (midi_ctrl->max); } } midi_ctrl->real_min = midi_ctrl->min; midi_ctrl->real_max = midi_ctrl->max; return midi_ctrl; } midi_control_t * wet_dry_midi_control_new (struct _plugin_slot * plugin_slot, unsigned long channel) { midi_control_t *midi_ctrl; midi_ctrl = midi_control_new (plugin_slot); midi_ctrl->fifo = plugin_slot->plugin->wet_dry_midi_fifos + channel; midi_ctrl->fifos = plugin_slot->plugin->wet_dry_midi_fifos; midi_ctrl->ctrl_type = WET_DRY_CONTROL; midi_ctrl->control.wet_dry.channel = channel; midi_ctrl->min = 0.0; midi_ctrl->max = 1.0; midi_ctrl->real_min = midi_ctrl->min; midi_ctrl->real_max = midi_ctrl->max; return midi_ctrl; } midi_control_t * toggle_midi_control_new (struct _plugin_slot * plugin_slot) { midi_control_t *midi_ctrl; midi_ctrl = midi_control_new (plugin_slot); midi_ctrl->ctrl_type = PLUGIN_ENABLE_CONTROL; midi_ctrl->min = 0.0; midi_ctrl->max = 1.0; midi_ctrl->real_min = midi_ctrl->min; midi_ctrl->real_max = midi_ctrl->max; return midi_ctrl; } void midi_control_destroy (midi_control_t * midi_ctrl) { pthread_mutex_destroy (&midi_ctrl->locked_lock); pthread_mutex_destroy (&midi_ctrl->midi_channel_lock); pthread_mutex_destroy (&midi_ctrl->midi_param_lock); g_free (midi_ctrl); } void midi_control_set_midi_channel (midi_control_t * midi_ctrl, unsigned char channel) { pthread_mutex_lock (&midi_ctrl->midi_channel_lock); midi_ctrl->midi_channel = channel; pthread_mutex_unlock (&midi_ctrl->midi_channel_lock); } void midi_control_set_midi_param (midi_control_t * midi_ctrl, unsigned int param) { pthread_mutex_lock (&midi_ctrl->midi_param_lock); midi_ctrl->midi_param = param; pthread_mutex_unlock (&midi_ctrl->midi_param_lock); } void midi_control_set_locked (midi_control_t * midi_ctrl, gboolean locked) { pthread_mutex_lock (&midi_ctrl->locked_lock); midi_ctrl->locked = locked; pthread_mutex_unlock (&midi_ctrl->locked_lock); } unsigned char midi_control_get_midi_channel (midi_control_t * midi_ctrl) { unsigned char channel; pthread_mutex_lock (&midi_ctrl->midi_channel_lock); channel = midi_ctrl->midi_channel; pthread_mutex_unlock (&midi_ctrl->midi_channel_lock); return channel; } unsigned int midi_control_get_midi_param (midi_control_t * midi_ctrl) { unsigned int param; pthread_mutex_lock (&midi_ctrl->midi_param_lock); param = midi_ctrl->midi_param; pthread_mutex_unlock (&midi_ctrl->midi_param_lock); return param; } gboolean midi_control_get_locked (midi_control_t * midi_ctrl) { gboolean locked; pthread_mutex_lock (&midi_ctrl->locked_lock); locked = midi_ctrl->locked; pthread_mutex_unlock (&midi_ctrl->locked_lock); return locked; } unsigned long midi_control_get_wet_dry_channel (midi_control_t * midi_ctrl) { g_assert (midi_ctrl->ctrl_type == WET_DRY_CONTROL); return midi_ctrl->control.wet_dry.channel; } unsigned long midi_control_get_ladspa_control (midi_control_t * midi_ctrl) { g_assert (midi_ctrl->ctrl_type == LADSPA_CONTROL); return midi_ctrl->control.ladspa.control; } guint midi_control_get_ladspa_copy (midi_control_t * midi_ctrl) { g_assert (midi_ctrl->ctrl_type == LADSPA_CONTROL); return midi_ctrl->control.ladspa.copy; } const char * midi_control_get_control_name (midi_control_t * midi_ctrl) { static GString *str = NULL; if (!str) str = g_string_new (""); switch(midi_ctrl->ctrl_type) { case LADSPA_CONTROL: { char *control; char *ptr; control = g_strdup (midi_ctrl->plugin_slot->plugin->desc-> port_names[midi_ctrl->plugin_slot->plugin->desc-> control_port_indicies[midi_ctrl->control.ladspa.control]]); ptr = strchr (control, '('); if (ptr) { *ptr = '\0'; while (isspace(*(--ptr))) *ptr = '\0'; } g_string_assign (str, control); g_free (control); break; } case WET_DRY_CONTROL: { g_string_assign (str, _("Wet/dry")); break; } case PLUGIN_ENABLE_CONTROL: { g_string_assign (str, _("Enable")); break; } } return str->str; } static LADSPA_Data midi_control_clip_value (midi_control_t *midi_ctrl, LADSPA_Data value) { if (value < midi_ctrl->real_min) value = midi_ctrl->real_min; else if (value > midi_ctrl->real_max) value = midi_ctrl->real_max; return value; } LADSPA_Data midi_control_set_min_value (midi_control_t *midi_ctrl, LADSPA_Data value) { value = midi_control_clip_value (midi_ctrl, value); pthread_mutex_lock (&midi_ctrl->midi_param_lock); midi_ctrl->min = value; pthread_mutex_unlock (&midi_ctrl->midi_param_lock); return value; } LADSPA_Data midi_control_set_max_value (midi_control_t *midi_ctrl, LADSPA_Data value) { value = midi_control_clip_value (midi_ctrl, value); pthread_mutex_lock (&midi_ctrl->midi_param_lock); midi_ctrl->max = value; pthread_mutex_unlock (&midi_ctrl->midi_param_lock); return value; } LADSPA_Data midi_control_get_min_value (midi_control_t * midi_ctrl) { LADSPA_Data value; pthread_mutex_lock (&midi_ctrl->midi_param_lock); value = midi_ctrl->min; pthread_mutex_unlock (&midi_ctrl->midi_param_lock); return value; } LADSPA_Data midi_control_get_max_value (midi_control_t * midi_ctrl) { LADSPA_Data value; pthread_mutex_lock (&midi_ctrl->midi_param_lock); value = midi_ctrl->max; pthread_mutex_unlock (&midi_ctrl->midi_param_lock); return value; } #endif /* HAVE_ALSA */ jack-rack-f9fb65d/src/midi_control.h000066400000000000000000000065721151220453700175030ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2003 (node@users.sourceforge.net) * * 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. */ #include "ac_config.h" #ifdef HAVE_ALSA #ifndef __JR_MIDI_CONTROL_H__ #define __JR_MIDI_CONTROL_H__ #include #include #include #include "lock_free_fifo.h" #include "globals.h" typedef struct _midi_control midi_control_t; struct _plugin_slot; struct _midi_control { unsigned char midi_channel; pthread_mutex_t midi_channel_lock; unsigned int midi_param; pthread_mutex_t midi_param_lock; gboolean locked; pthread_mutex_t locked_lock; LADSPA_Data min; LADSPA_Data max; LADSPA_Data real_min; LADSPA_Data real_max; lff_t *fifo; lff_t *fifos; struct _plugin_slot *plugin_slot; midi_control_type_t ctrl_type; union { struct { unsigned long control; guint copy; } ladspa; struct { unsigned long channel; } wet_dry; } control; }; midi_control_t *ladspa_midi_control_new (struct _plugin_slot * plugin_slot, guint copy, unsigned long control); midi_control_t *wet_dry_midi_control_new (struct _plugin_slot * plugin_slot, unsigned long channel); midi_control_t *toggle_midi_control_new (struct _plugin_slot * plugin_slot); void midi_control_destroy (midi_control_t * midi_ctrl); void midi_control_set_midi_channel (midi_control_t * midi_ctrl, unsigned char channel); void midi_control_set_midi_param (midi_control_t * midi_ctrl, unsigned int param); void midi_control_set_locked (midi_control_t * midi_ctrl, gboolean locked); unsigned char midi_control_get_midi_channel (midi_control_t * midi_ctrl); unsigned int midi_control_get_midi_param (midi_control_t * midi_ctrl); unsigned long midi_control_get_wet_dry_channel (midi_control_t * midi_ctrl); unsigned long midi_control_get_ladspa_control (midi_control_t * midi_ctrl); guint midi_control_get_ladspa_copy (midi_control_t * midi_ctrl); gboolean midi_control_get_locked (midi_control_t * midi_ctrl); const char * midi_control_get_control_name (midi_control_t * midi_ctrl); LADSPA_Data midi_control_set_min_value (midi_control_t * midi_ctrl, LADSPA_Data value); LADSPA_Data midi_control_set_max_value (midi_control_t * midi_ctrl, LADSPA_Data value); LADSPA_Data midi_control_get_min_value (midi_control_t * midi_ctrl); LADSPA_Data midi_control_get_max_value (midi_control_t * midi_ctrl); #endif /* __JR_MIDI_CONTROL_H__ */ #endif /* HAVE_ALSA */ jack-rack-f9fb65d/src/midi_window.c000066400000000000000000000316531151220453700173230ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #include "ac_config.h" #ifdef HAVE_ALSA #include "globals.h" #include "midi_window.h" #include "ui.h" #include "control_message.h" static void ok_cb (GtkButton *button, gpointer user_data); static void remove_cb (GtkButton *button, gpointer user_data); static void channel_cb (GtkCellRendererText *channel_renderer, gchar *arg1, gchar *arg2, gpointer user_data); static void param_cb (GtkCellRendererText *param_renderer, gchar *arg1, gchar *arg2, gpointer user_data); static void minvalue_cb(GtkCellRendererText *param_renderer, gchar *arg1, gchar *arg2, gpointer user_data); static void maxvalue_cb(GtkCellRendererText *param_renderer, gchar *arg1, gchar *arg2, gpointer user_data); /** * Creates the tree view. */ static void midi_window_create_control_view (midi_window_t *mwin) { GtkWidget *scroll; GtkCellRenderer *renderer; GtkCellRenderer *channel_renderer; GtkCellRenderer *param_renderer; GtkCellRenderer *minvalue_renderer; GtkCellRenderer *maxvalue_renderer; GtkTreeViewColumn *column; /* scroll window for the list */ scroll = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scroll); gtk_box_pack_start (GTK_BOX (mwin->main_box), scroll, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); /* the store */ mwin->controls = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_FLOAT, G_TYPE_FLOAT, G_TYPE_POINTER); /* the view */ mwin->controls_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (mwin->controls)); g_object_unref (G_OBJECT (mwin->controls)); gtk_widget_show (mwin->controls_view); gtk_container_add (GTK_CONTAINER(scroll), mwin->controls_view); /* plugin column */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes ( _("Plugin"), renderer, "text", PLUGIN_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (mwin->controls_view), column); /* control column */ column = gtk_tree_view_column_new_with_attributes ( _("Control"), renderer, "text", CONTROL_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (mwin->controls_view), column); /* index column */ column = gtk_tree_view_column_new_with_attributes ( _("Index"), renderer, "text", INDEX_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (mwin->controls_view), column); /* channel column */ channel_renderer = gtk_cell_renderer_text_new (); g_object_set (channel_renderer, "editable", TRUE, NULL); g_signal_connect (G_OBJECT (channel_renderer), "edited", G_CALLBACK (channel_cb), mwin); column = gtk_tree_view_column_new_with_attributes ( _("MIDI Channel"), channel_renderer, "text", CHANNEL_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (mwin->controls_view), column); /* param column */ param_renderer = gtk_cell_renderer_text_new (); g_object_set (param_renderer, "editable", TRUE, NULL); g_signal_connect (G_OBJECT (param_renderer), "edited", G_CALLBACK (param_cb), mwin); column = gtk_tree_view_column_new_with_attributes ( _("MIDI Controller"), param_renderer, "text", PARAM_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (mwin->controls_view), column); /* minvalue column */ minvalue_renderer = gtk_cell_renderer_text_new (); g_object_set (minvalue_renderer, "editable", TRUE, NULL); g_signal_connect (G_OBJECT (minvalue_renderer), "edited", G_CALLBACK (minvalue_cb), mwin); column = gtk_tree_view_column_new_with_attributes ( _("Min Value"), minvalue_renderer, "text", MINVALUE_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (mwin->controls_view), column); /* maxvalue column */ maxvalue_renderer = gtk_cell_renderer_text_new (); g_object_set (maxvalue_renderer, "editable", TRUE, NULL); g_signal_connect (G_OBJECT (maxvalue_renderer), "edited", G_CALLBACK (maxvalue_cb), mwin); column = gtk_tree_view_column_new_with_attributes ( _("Max Value"), maxvalue_renderer, "text", MAXVALUE_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (mwin->controls_view), column); } /** * Creates the window. */ midi_window_t * midi_window_new (ui_t *ui) { midi_window_t *mwin; GtkWidget *button_box; GtkWidget *ok; GtkWidget *remove; mwin = g_malloc0 (sizeof (midi_window_t)); mwin->ui = ui; /* main window */ mwin->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_default_size (GTK_WINDOW (mwin->window), 400, 200); gtk_window_set_title (GTK_WINDOW (mwin->window), _("JACK Rack MIDI Controls")); gtk_window_set_transient_for (GTK_WINDOW (mwin->window), GTK_WINDOW (ui->main_window)); gtk_window_set_destroy_with_parent (GTK_WINDOW (mwin->window), TRUE); g_signal_connect (G_OBJECT (mwin->window), "delete_event", G_CALLBACK (gtk_widget_hide_on_delete), mwin->window); /* main box */ mwin->main_box = gtk_vbox_new (FALSE, 0); gtk_widget_show (mwin->main_box); gtk_container_add (GTK_CONTAINER (mwin->window), mwin->main_box); /* * buttons */ button_box = gtk_hbutton_box_new (); gtk_widget_show (button_box); gtk_box_pack_end (GTK_BOX (mwin->main_box), button_box, FALSE, TRUE, 0); /* remove_button */ remove = gtk_button_new_from_stock (GTK_STOCK_REMOVE); gtk_widget_show (remove); g_signal_connect (G_OBJECT (remove), "clicked", G_CALLBACK (remove_cb), mwin); gtk_box_pack_start (GTK_BOX (button_box), remove, FALSE, TRUE, 0); /* ok button */ ok = gtk_button_new_from_stock (GTK_STOCK_OK); gtk_widget_show (ok); g_signal_connect (G_OBJECT (ok), "clicked", G_CALLBACK (ok_cb), mwin); gtk_box_pack_start (GTK_BOX (button_box), ok, FALSE, TRUE, 0); /* * midi controls */ midi_window_create_control_view (mwin); return mwin; } void midi_window_destroy (midi_window_t * mwin) { g_free (mwin); } /** * Walks the tree view and deletes a control. */ void midi_window_remove_control (midi_window_t* mwin, midi_control_t* midi_ctrl) { GtkTreeIter iter; gboolean succ; midi_control_t *list_mctrl; succ = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (mwin->controls), &iter); if (!succ) return; do { gtk_tree_model_get (GTK_TREE_MODEL (mwin->controls), &iter, MIDI_CONTROL_POINTER, &list_mctrl, -1); if (list_mctrl == midi_ctrl) { gtk_list_store_remove (mwin->controls, &iter); return; } } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (mwin->controls), &iter)); } void midi_window_add_control (midi_window_t *mwin, midi_control_t *midi_ctrl) { GtkTreeIter iter; gtk_list_store_append (mwin->controls, &iter); int index = 1; switch(midi_ctrl->ctrl_type) { case LADSPA_CONTROL: index = midi_ctrl->control.ladspa.copy; break; case WET_DRY_CONTROL: index = midi_ctrl->control.wet_dry.channel + 1; break; case PLUGIN_ENABLE_CONTROL: break; } gtk_list_store_set ( mwin->controls, &iter, PLUGIN_COLUMN, midi_ctrl->plugin_slot->plugin->desc->name, CONTROL_COLUMN, midi_control_get_control_name (midi_ctrl), INDEX_COLUMN, index, CHANNEL_COLUMN, midi_control_get_midi_channel (midi_ctrl), PARAM_COLUMN, midi_control_get_midi_param (midi_ctrl), MINVALUE_COLUMN, midi_ctrl->min, MAXVALUE_COLUMN, midi_ctrl->max, MIDI_CONTROL_POINTER, midi_ctrl, -1); gtk_widget_show (mwin->window); } static void ok_cb (GtkButton *button, gpointer user_data) { midi_window_t *mwin = user_data; gtk_widget_hide (mwin->window); } static gboolean get_selected_iter (midi_window_t *mwin, GtkTreeIter * iter) { GtkTreeSelection * selection; GtkTreeModel * model; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (mwin->controls_view)); return gtk_tree_selection_get_selected (selection, &model, iter); } static void remove_cb (GtkButton *button, gpointer user_data) { midi_window_t *mwin = user_data; midi_control_t *midi_ctrl; ctrlmsg_t ctrlmsg; GtkTreeIter iter; if (!get_selected_iter (mwin, &iter)) return; gtk_tree_model_get (GTK_TREE_MODEL (mwin->controls), &iter, MIDI_CONTROL_POINTER, &midi_ctrl, -1); ctrlmsg.type = CTRLMSG_MIDI_REMOVE; ctrlmsg.data.midi.midi_control = midi_ctrl; lff_write (midi_ctrl->plugin_slot->jack_rack->ui->ui_to_midi, &ctrlmsg); midi_ctrl->plugin_slot->midi_controls = g_slist_remove (midi_ctrl->plugin_slot->midi_controls, midi_ctrl); } static void channel_cb (GtkCellRendererText *cell, gchar *path_string, gchar *new_text, gpointer user_data) { midi_window_t *mwin = user_data; midi_control_t *midi_ctrl; GtkTreePath *path = gtk_tree_path_new_from_string (path_string); GtkTreeIter iter; unsigned char channel; gtk_tree_model_get_iter (GTK_TREE_MODEL (mwin->controls), &iter, path); channel = atof (new_text); if (channel < 1 || channel > 16) return; gtk_tree_model_get (GTK_TREE_MODEL (mwin->controls), &iter, MIDI_CONTROL_POINTER, &midi_ctrl, -1); midi_control_set_midi_channel (midi_ctrl, channel); gtk_list_store_set (mwin->controls, &iter, CHANNEL_COLUMN, (int) channel, -1); } static void param_cb (GtkCellRendererText *cell, gchar *path_string, gchar *new_text, gpointer user_data) { midi_window_t *mwin = user_data; midi_control_t *midi_ctrl; GtkTreePath *path = gtk_tree_path_new_from_string (path_string); GtkTreeIter iter; unsigned int param; gtk_tree_model_get_iter (GTK_TREE_MODEL (mwin->controls), &iter, path); param = atof (new_text); if (param < 0 || param > 127) return; gtk_tree_model_get (GTK_TREE_MODEL (mwin->controls), &iter, MIDI_CONTROL_POINTER, &midi_ctrl, -1); midi_control_set_midi_param (midi_ctrl, param); gtk_list_store_set (mwin->controls, &iter, PARAM_COLUMN, (int) param, -1); } static void minvalue_cb(GtkCellRendererText *cell, gchar *path_string, gchar *new_text, gpointer user_data) { midi_window_t *mwin = user_data; midi_control_t *midi_ctrl; GtkTreePath *path = gtk_tree_path_new_from_string (path_string); GtkTreeIter iter; LADSPA_Data value; gtk_tree_model_get_iter (GTK_TREE_MODEL (mwin->controls), &iter, path); gtk_tree_model_get (GTK_TREE_MODEL (mwin->controls), &iter, MIDI_CONTROL_POINTER, &midi_ctrl, -1); value = atof(new_text); value = midi_control_set_min_value(midi_ctrl, value); gtk_list_store_set (mwin->controls, &iter, MINVALUE_COLUMN, value, -1); } static void maxvalue_cb(GtkCellRendererText *cell, gchar *path_string, gchar *new_text, gpointer user_data) { midi_window_t *mwin = user_data; midi_control_t *midi_ctrl; GtkTreePath *path = gtk_tree_path_new_from_string (path_string); GtkTreeIter iter; LADSPA_Data value; gtk_tree_model_get_iter (GTK_TREE_MODEL (mwin->controls), &iter, path); gtk_tree_model_get (GTK_TREE_MODEL (mwin->controls), &iter, MIDI_CONTROL_POINTER, &midi_ctrl, -1); value = atof(new_text); value = midi_control_set_max_value(midi_ctrl, value); gtk_list_store_set (mwin->controls, &iter, MAXVALUE_COLUMN, value, -1); } #endif /* HAVE_ALSA */ jack-rack-f9fb65d/src/midi_window.h000066400000000000000000000033551151220453700173260ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_MIDI_WINDOW_H__ #define __JR_MIDI_WINDOW_H__ #include "ac_config.h" #ifdef HAVE_ALSA #include #include "midi_control.h" typedef struct _midi_table_row midi_table_row_t; typedef struct _midi_window midi_window_t; enum _midi_window_columns { PLUGIN_COLUMN, CONTROL_COLUMN, INDEX_COLUMN, CHANNEL_COLUMN, PARAM_COLUMN, MINVALUE_COLUMN, MAXVALUE_COLUMN, MIDI_CONTROL_POINTER, N_COLUMNS }; struct _ui; struct _midi_window { struct _ui *ui; GtkWidget *window; GtkWidget *main_box; GtkListStore *controls; GtkWidget *controls_view; }; midi_window_t *midi_window_new (struct _ui *ui); void midi_window_destroy (midi_window_t * midi_window); void midi_window_add_control (midi_window_t *mwin, midi_control_t *midi_ctrl); void midi_window_remove_control (midi_window_t *mwin, midi_control_t *midi_ctrl); #endif /* HAVE_ALSA */ #endif /* __JR_MIDI_WINDOW_H__ */ jack-rack-f9fb65d/src/plugin.c000066400000000000000000000367471151220453700163210ustar00rootroot00000000000000/* * jack-ladspa-host * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #include "ac_config.h" #include #include #include #include #include #include #include "plugin.h" #include "jack_rack.h" #include "process.h" #include "ui.h" #define CONTROL_FIFO_SIZE 128 /* swap over the jack ports in two plugins */ static void plugin_swap_aux_ports (plugin_t * plugin, plugin_t * other) { guint copy; jack_port_t ** aux_ports_tmp; for (copy = 0; copy < plugin->copies; copy++) { aux_ports_tmp = other->holders[copy].aux_ports; other->holders[copy].aux_ports = plugin->holders[copy].aux_ports; plugin->holders[copy].aux_ports = aux_ports_tmp; } } /** connect up the ladspa instance's input buffers to the previous plugin's audio memory. make sure to check that plugin->prev exists. */ void plugin_connect_input_ports (plugin_t * plugin, LADSPA_Data ** inputs) { gint copy; unsigned long channel; unsigned long rack_channel; if (!plugin || !inputs) return; rack_channel = 0; for (copy = 0; copy < plugin->copies; copy++) { for (channel = 0; channel < plugin->desc->channels; channel++) { plugin->descriptor-> connect_port (plugin->holders[copy].instance, plugin->desc->audio_input_port_indicies[channel], inputs[rack_channel]); rack_channel++; } } plugin->audio_input_memory = inputs; } /** connect up a plugin's output ports to its own audio_output_memory output memory */ void plugin_connect_output_ports (plugin_t * plugin) { gint copy; unsigned long channel; unsigned long rack_channel = 0; if (!plugin) return; for (copy = 0; copy < plugin->copies; copy++) { for (channel = 0; channel < plugin->desc->channels; channel++) { plugin->descriptor-> connect_port (plugin->holders[copy].instance, plugin->desc->audio_output_port_indicies[channel], plugin->audio_output_memory[rack_channel]); rack_channel++; } } } void process_add_plugin (process_info_t * procinfo, plugin_t * plugin) { /* sort out list pointers */ plugin->next = NULL; plugin->prev = procinfo->chain_end; if (procinfo->chain_end) procinfo->chain_end->next = plugin; else procinfo->chain = plugin; procinfo->chain_end = plugin; } /** remove a plugin from the chain */ plugin_t * process_remove_plugin (process_info_t * procinfo, plugin_t *plugin) { /* sort out chain pointers */ if (plugin->prev) plugin->prev->next = plugin->next; else procinfo->chain = plugin->next; if (plugin->next) plugin->next->prev = plugin->prev; else procinfo->chain_end = plugin->prev; /* sort out the aux ports */ if (plugin->desc->aux_channels > 0) { plugin_t * other; for (other = plugin->next; other; other = other->next) if (other->desc->id == plugin->desc->id) plugin_swap_aux_ports (plugin, other); } return plugin; } /** enable/disable a plugin */ void process_ablise_plugin (process_info_t * procinfo, plugin_t *plugin, gboolean enable) { plugin->enabled = enable; } /** enable/disable a plugin */ void process_ablise_plugin_wet_dry (process_info_t * procinfo, plugin_t *plugin, gboolean enable) { plugin->wet_dry_enabled = enable; } /** move a plugin up or down one place in the chain */ void process_move_plugin (process_info_t * procinfo, plugin_t *plugin, gint up) { /* other plugins in the chain */ plugin_t *pp = NULL, *p, *n, *nn = NULL; /* note that we should never recieve an illogical move request ie, there will always be at least 1 plugin before for an up request or 1 plugin after for a down request */ /* these are pointers to the plugins surrounding the specified one: { pp, p, plugin, n, nn } which makes things much clearer than tptr, tptr2 etc */ p = plugin->prev; if (p) pp = p->prev; n = plugin->next; if (n) nn = n->next; if (up) { if (!p) return; if (pp) pp->next = plugin; else procinfo->chain = plugin; p->next = n; p->prev = plugin; plugin->prev = pp; plugin->next = p; if (n) n->prev = p; else procinfo->chain_end = p; } else { if (!n) return; if (p) p->next = n; else procinfo->chain = n; n->prev = p; n->next = plugin; plugin->prev = n; plugin->next = nn; if (nn) nn->prev = plugin; else procinfo->chain_end = plugin; } if (plugin->desc->aux_channels > 0) { plugin_t * other; other = up ? plugin->next : plugin->prev; /* swap around the jack ports */ if (other->desc->id == plugin->desc->id) plugin_swap_aux_ports (plugin, other); } } /** exchange an existing plugin for a newly created one */ plugin_t * process_change_plugin (process_info_t * procinfo, plugin_t *plugin, plugin_t * new_plugin) { new_plugin->next = plugin->next; new_plugin->prev = plugin->prev; if (plugin->prev) plugin->prev->next = new_plugin; else procinfo->chain = new_plugin; if (plugin->next) plugin->next->prev = new_plugin; else procinfo->chain_end = new_plugin; /* sort out the aux ports */ if (plugin->desc->aux_channels > 0) { plugin_t * other; for (other = plugin->next; other; other = other->next) if (other->desc->id == plugin->desc->id) plugin_swap_aux_ports (plugin, other); } return plugin; } /****************************************** ************* non RT stuff *************** ******************************************/ static int plugin_open_plugin (plugin_desc_t * desc, void ** dl_handle_ptr, const LADSPA_Descriptor ** descriptor_ptr) { void * dl_handle; const char * dlerr; LADSPA_Descriptor_Function get_descriptor; /* open the object file */ dl_handle = dlopen (desc->object_file, RTLD_NOW|RTLD_GLOBAL); if (!dl_handle) { fprintf (stderr, _("%s: error opening shared object file '%s': %s\n"), __FUNCTION__, desc->object_file, dlerror()); return 1; } /* get the get_descriptor function */ dlerror (); /* clear the error report */ get_descriptor = (LADSPA_Descriptor_Function) dlsym (dl_handle, "ladspa_descriptor"); dlerr = dlerror(); if (dlerr) { fprintf (stderr, _("%s: error finding descriptor symbol in object file '%s': %s\n"), __FUNCTION__, desc->object_file, dlerr); dlclose (dl_handle); return 1; } *descriptor_ptr = get_descriptor (desc->index); *dl_handle_ptr = dl_handle; return 0; } static int plugin_instantiate (const LADSPA_Descriptor * descriptor, unsigned long plugin_index, gint copies, LADSPA_Handle * instances) { gint i; for (i = 0; i < copies; i++) { instances[i] = descriptor->instantiate (descriptor, sample_rate); if (!instances[i]) { unsigned long d; for (d = 0; d < i; d++) descriptor->cleanup (instances[d]); return 1; } } return 0; } static void plugin_create_aux_ports (plugin_t * plugin, guint copy, jack_rack_t * jack_rack) { plugin_desc_t * desc; plugin_slot_t * slot; unsigned long aux_channel = 1; unsigned long plugin_index = 1; unsigned long i; char port_name[64]; char * plugin_name; char * ptr; GList * list; ladspa_holder_t * holder; desc = plugin->desc; holder = plugin->holders + copy; holder->aux_ports = g_malloc (sizeof (jack_port_t *) * desc->aux_channels); /* make the plugin name jack worthy */ ptr = plugin_name = g_strndup (plugin->desc->name, 7); while (*ptr != '\0') { if (*ptr == ' ') *ptr = '_'; else *ptr = tolower (*ptr); ptr++; } for (list = jack_rack->slots; list; list = g_list_next (list)) { slot = (plugin_slot_t *) list->data; if (slot->plugin->desc->id == plugin->desc->id) plugin_index++; } for (i = 0; i < desc->aux_channels; i++, aux_channel++) { sprintf (port_name, "%s_%ld-%d_%c%ld", plugin_name, plugin_index, copy + 1, desc->aux_are_input ? 'i' : 'o', aux_channel); holder->aux_ports[i] = jack_port_register (jack_rack->ui->procinfo->jack_client, port_name, JACK_DEFAULT_AUDIO_TYPE, desc->aux_are_input ? JackPortIsInput : JackPortIsOutput, 0); if (!holder->aux_ports[i]) ui_display_error (jack_rack->ui, E_FATAL, _("Could not register jack port '%s'; aborting"), port_name); } g_free (plugin_name); } static LADSPA_Data unused_control_port_output; static void plugin_init_holder (plugin_t * plugin, guint copy, LADSPA_Handle instance, jack_rack_t * jack_rack) { unsigned long i; plugin_desc_t * desc; ladspa_holder_t * holder; desc = plugin->desc; holder = plugin->holders + copy; holder->instance = instance; if (desc->control_port_count > 0) { holder->ui_control_fifos = g_malloc (sizeof (lff_t) * desc->control_port_count); #ifdef HAVE_ALSA holder->midi_control_fifos = g_malloc (sizeof (lff_t) * desc->control_port_count); #endif holder->control_memory = g_malloc (sizeof (LADSPA_Data) * desc->control_port_count); } else { holder->ui_control_fifos = NULL; #ifdef HAVE_ALSA holder->midi_control_fifos = NULL; #endif holder->control_memory = NULL; } for (i = 0; i < desc->control_port_count; i++) { lff_init (holder->ui_control_fifos + i, CONTROL_FIFO_SIZE, sizeof (LADSPA_Data)); #ifdef HAVE_ALSA lff_init (holder->midi_control_fifos + i, CONTROL_FIFO_SIZE, sizeof (LADSPA_Data)); #endif holder->control_memory[i] = plugin_desc_get_default_control_value (desc, desc->control_port_indicies[i], sample_rate); plugin->descriptor-> connect_port (instance, desc->control_port_indicies[i], holder->control_memory + i); } for (i = 0; i < desc->port_count; i++) { if (!LADSPA_IS_PORT_CONTROL (desc->port_descriptors[i])) continue; if (LADSPA_IS_PORT_OUTPUT (desc->port_descriptors[i])) plugin->descriptor-> connect_port (instance, i, &unused_control_port_output); } if (plugin->desc->aux_channels > 0) plugin_create_aux_ports (plugin, copy, jack_rack); if (plugin->descriptor->activate) plugin->descriptor->activate (instance); } plugin_t * plugin_new (plugin_desc_t * desc, jack_rack_t * jack_rack) { void * dl_handle; const LADSPA_Descriptor * descriptor; LADSPA_Handle * instances; gint copies; unsigned long i; int err; plugin_t * plugin; /* open the plugin */ err = plugin_open_plugin (desc, &dl_handle, &descriptor); if (err) return NULL; /* create the instances */ copies = plugin_desc_get_copies (desc, jack_rack->channels); instances = g_malloc (sizeof (LADSPA_Handle) * copies); err = plugin_instantiate (descriptor, desc->index, copies, instances); if (err) { g_free (instances); dlclose (dl_handle); return NULL; } plugin = g_malloc (sizeof (plugin_t)); plugin->descriptor = descriptor; plugin->dl_handle = dl_handle; plugin->desc = desc; plugin->copies = copies; plugin->enabled = FALSE; plugin->next = NULL; plugin->prev = NULL; plugin->wet_dry_enabled = FALSE; /* create audio memory and wet/dry stuff */ plugin->audio_output_memory = g_malloc (sizeof (LADSPA_Data *) * jack_rack->channels); plugin->wet_dry_fifos = g_malloc (sizeof (lff_t) * jack_rack->channels); plugin->wet_dry_values = g_malloc (sizeof (LADSPA_Data) * jack_rack->channels); #ifdef HAVE_ALSA plugin->wet_dry_midi_fifos = g_malloc (sizeof (lff_t) * jack_rack->channels); #endif for (i = 0; i < jack_rack->channels; i++) { plugin->audio_output_memory[i] = g_malloc (sizeof (LADSPA_Data) * buffer_size); lff_init (plugin->wet_dry_fifos + i, CONTROL_FIFO_SIZE, sizeof (LADSPA_Data)); #ifdef HAVE_ALSA lff_init (plugin->wet_dry_midi_fifos + i, CONTROL_FIFO_SIZE, sizeof (LADSPA_Data)); #endif plugin->wet_dry_values[i] = 1.0; } /* create holders and fill them out */ plugin->holders = g_malloc (sizeof (ladspa_holder_t) * copies); for (i = 0; i < copies; i++) plugin_init_holder (plugin, i, instances[i], jack_rack); return plugin; } void plugin_destroy (plugin_t * plugin, ui_t *ui) { unsigned long i, j; int err; /* destroy holders */ for (i = 0; i < plugin->copies; i++) { if (plugin->descriptor->deactivate) plugin->descriptor->deactivate (plugin->holders[i].instance); /* if (plugin->descriptor->cleanup) plugin->descriptor->cleanup (plugin->holders[i].instance); */ if (plugin->desc->control_port_count > 0) { for (j = 0; j < plugin->desc->control_port_count; j++) { lff_free (plugin->holders[i].ui_control_fifos + j); #ifdef HAVE_ALSA lff_free (plugin->holders[i].midi_control_fifos + j); #endif } g_free (plugin->holders[i].ui_control_fifos); #ifdef HAVE_ALSA g_free (plugin->holders[i].midi_control_fifos); #endif g_free (plugin->holders[i].control_memory); } /* aux ports */ if (plugin->desc->aux_channels > 0) { for (j = 0; j < plugin->desc->aux_channels; j++) { err = jack_port_unregister (ui->procinfo->jack_client, plugin->holders[i].aux_ports[j]); if (err) fprintf (stderr, _("%s: could not unregister jack port\n"), __FUNCTION__); } g_free (plugin->holders[i].aux_ports); } } g_free (plugin->holders); for (i = 0; i < ui->jack_rack->channels; i++) { g_free (plugin->audio_output_memory[i]); lff_free (plugin->wet_dry_fifos + i); #ifdef HAVE_ALSA lff_free (plugin->wet_dry_midi_fifos + i); #endif } g_free (plugin->audio_output_memory); g_free (plugin->wet_dry_fifos); #ifdef HAVE_ALSA g_free (plugin->wet_dry_midi_fifos); #endif g_free (plugin->wet_dry_values); err = dlclose (plugin->dl_handle); if (err) { fprintf (stderr, _("%s: error closing shared object '%s': %s\n"), __FUNCTION__, plugin->desc->object_file, dlerror ()); } g_free (plugin); } /* EOF */ jack-rack-f9fb65d/src/plugin.h000066400000000000000000000055041151220453700163110ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_PLUGIN_H__ #define __JR_PLUGIN_H__ #include "ac_config.h" #include #include #include #include "process.h" #include "plugin_desc.h" typedef struct _ladspa_holder ladspa_holder_t; typedef struct _plugin plugin_t; struct _ladspa_holder { LADSPA_Handle instance; lff_t * ui_control_fifos; #ifdef HAVE_ALSA lff_t * midi_control_fifos; #endif LADSPA_Data * control_memory; jack_port_t ** aux_ports; }; struct _plugin { plugin_desc_t * desc; gint enabled; gint copies; ladspa_holder_t * holders; LADSPA_Data ** audio_input_memory; LADSPA_Data ** audio_output_memory; gboolean wet_dry_enabled; /* 1.0 = all wet, 0.0 = all dry, 0.5 = 50% wet/50% dry */ LADSPA_Data * wet_dry_values; lff_t * wet_dry_fifos; #ifdef HAVE_ALSA lff_t * wet_dry_midi_fifos; #endif plugin_t * next; plugin_t * prev; const LADSPA_Descriptor * descriptor; void * dl_handle; }; void process_add_plugin (process_info_t *, plugin_t *plugin); plugin_t * process_remove_plugin (process_info_t *, plugin_t *plugin); void process_ablise_plugin (process_info_t *, plugin_t *plugin, gboolean able); void process_ablise_plugin_wet_dry (process_info_t *, plugin_t *plugin, gboolean enable); void process_move_plugin (process_info_t *, plugin_t *plugin, gint up); plugin_t * process_change_plugin (process_info_t *, plugin_t *plugin, plugin_t * new_plugin); struct _jack_rack; struct _ui; plugin_t * plugin_new (plugin_desc_t * plugin_desc, struct _jack_rack * jack_rack); void plugin_destroy (plugin_t * plugin, struct _ui *ui); void plugin_connect_input_ports (plugin_t * plugin, LADSPA_Data ** inputs); void plugin_connect_output_ports (plugin_t * plugin); #endif /* __JR_PLUGIN_H__ */ jack-rack-f9fb65d/src/plugin_desc.c000066400000000000000000000261371151220453700173070ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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 * 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. */ #include #include #include #include "plugin_desc.h" #include "globals.h" #include "plugin.h" void plugin_desc_set_ports (plugin_desc_t * pd, unsigned long port_count, const LADSPA_PortDescriptor * port_descriptors, const LADSPA_PortRangeHint * port_range_hints, const char * const * port_names); static void plugin_desc_init (plugin_desc_t * pd) { pd->object_file = NULL; pd->id = 0; pd->name = NULL; pd->properties = 0; pd->channels = 0; pd->port_count = 0; pd->port_descriptors = NULL; pd->port_range_hints = NULL; pd->audio_input_port_indicies = NULL; pd->audio_output_port_indicies = NULL; pd->audio_aux_port_indicies = NULL; pd->control_port_count = 0; pd->control_port_indicies = NULL; pd->aux_channels = 0; pd->aux_are_input = TRUE; } static void plugin_desc_free_ports (plugin_desc_t * pd) { if (pd->port_count) { g_free (pd->port_descriptors); g_free (pd->port_range_hints); pd->port_descriptors = NULL; pd->port_range_hints = NULL; pd->port_count = 0; } } static void plugin_desc_free (plugin_desc_t * pd) { plugin_desc_set_object_file (pd, NULL); plugin_desc_set_name (pd, NULL); plugin_desc_free_ports (pd); } plugin_desc_t * plugin_desc_new (void) { plugin_desc_t * pd; pd = g_malloc (sizeof (plugin_desc_t)); plugin_desc_init (pd); return pd; } plugin_desc_t * plugin_desc_new_with_descriptor (const char * object_file, unsigned long index, const LADSPA_Descriptor * descriptor) { plugin_desc_t * pd; pd = plugin_desc_new (); plugin_desc_set_object_file (pd, object_file); plugin_desc_set_index (pd, index); plugin_desc_set_id (pd, descriptor->UniqueID); plugin_desc_set_name (pd, descriptor->Name); plugin_desc_set_properties (pd, descriptor->Properties); plugin_desc_set_ports (pd, descriptor->PortCount, descriptor->PortDescriptors, descriptor->PortRangeHints, descriptor->PortNames); pd->rt = LADSPA_IS_HARD_RT_CAPABLE(pd->properties) ? TRUE : FALSE; return pd; } void plugin_desc_destroy (plugin_desc_t * pd) { plugin_desc_free (pd); g_free (pd); } void plugin_desc_set_object_file (plugin_desc_t * pd, const char * object_file) { set_string_property (pd->object_file, object_file); } void plugin_desc_set_index (plugin_desc_t * pd, unsigned long index) { pd->index = index; } void plugin_desc_set_id (plugin_desc_t * pd, unsigned long id) { pd->id = id; } void plugin_desc_set_name (plugin_desc_t * pd, const char * name) { set_string_property (pd->name, name); } void plugin_desc_set_properties (plugin_desc_t * pd, LADSPA_Properties properties) { pd->properties = properties; } static void plugin_desc_add_audio_port_index (unsigned long ** indicies, unsigned long * current_port_count, unsigned long index) { (*current_port_count)++; if (*current_port_count == 1) *indicies = g_malloc (sizeof (unsigned long) * *current_port_count); else *indicies = g_realloc (*indicies, sizeof (unsigned long) * *current_port_count); (*indicies)[*current_port_count - 1] = index; } static void plugin_desc_set_port_counts (plugin_desc_t * pd) { unsigned long i; unsigned long icount = 0; unsigned long ocount = 0; for (i = 0; i < pd->port_count; i++) { if (LADSPA_IS_PORT_AUDIO (pd->port_descriptors[i])) { if (LADSPA_IS_PORT_INPUT (pd->port_descriptors[i])) plugin_desc_add_audio_port_index (&pd->audio_input_port_indicies, &icount, i); else plugin_desc_add_audio_port_index (&pd->audio_output_port_indicies, &ocount, i); } else { if (LADSPA_IS_PORT_OUTPUT (pd->port_descriptors[i])) continue; pd->control_port_count++; if (pd->control_port_count == 1) pd->control_port_indicies = g_malloc (sizeof (unsigned long) * pd->control_port_count); else pd->control_port_indicies = g_realloc (pd->control_port_indicies, sizeof (unsigned long) * pd->control_port_count); pd->control_port_indicies[pd->control_port_count - 1] = i; } } if (icount == ocount) pd->channels = icount; else { /* deal with auxilliary ports */ unsigned long ** port_indicies; unsigned long port_count; unsigned long i, j; if (icount > ocount) { pd->channels = ocount; pd->aux_channels = icount - ocount; pd->aux_are_input = TRUE; port_indicies = &pd->audio_input_port_indicies; port_count = icount; } else { pd->channels = icount; pd->aux_channels = ocount - icount; pd->aux_are_input = FALSE; port_indicies = &pd->audio_output_port_indicies; port_count = ocount; } /* allocate indicies */ pd->audio_aux_port_indicies = g_malloc (sizeof (unsigned long) * pd->aux_channels); /* copy indicies */ for (i = pd->channels, j = 0; i < port_count; i++, j++) pd->audio_aux_port_indicies[j] = (*port_indicies)[i]; /* shrink the main indicies to only have channels indicies */ *port_indicies = g_realloc (*port_indicies, sizeof (unsigned long) * pd->channels); } } void plugin_desc_set_ports (plugin_desc_t * pd, unsigned long port_count, const LADSPA_PortDescriptor * port_descriptors, const LADSPA_PortRangeHint * port_range_hints, const char * const * port_names) { unsigned long i; plugin_desc_free_ports (pd); if (!port_count) return; pd->port_count = port_count; pd->port_descriptors = g_malloc (sizeof (LADSPA_PortDescriptor) * port_count); pd->port_range_hints = g_malloc (sizeof (LADSPA_PortRangeHint) * port_count); pd->port_names = g_malloc (sizeof (char *) * port_count); memcpy (pd->port_descriptors, port_descriptors, sizeof (LADSPA_PortDescriptor) * port_count); memcpy (pd->port_range_hints, port_range_hints, sizeof (LADSPA_PortRangeHint) * port_count); for (i = 0; i < port_count; i++) pd->port_names[i] = g_strdup (port_names[i]); plugin_desc_set_port_counts (pd); } LADSPA_Data plugin_desc_get_default_control_value (plugin_desc_t * pd, unsigned long port_index, jack_nframes_t sample_rate) { LADSPA_Data upper, lower; LADSPA_PortRangeHintDescriptor hint_descriptor; hint_descriptor = pd->port_range_hints[port_index].HintDescriptor; /* set upper and lower, possibly adjusted to the sample rate */ if (LADSPA_IS_HINT_SAMPLE_RATE(hint_descriptor)) { upper = pd->port_range_hints[port_index].UpperBound * (LADSPA_Data) sample_rate; lower = pd->port_range_hints[port_index].LowerBound * (LADSPA_Data) sample_rate; } else { upper = pd->port_range_hints[port_index].UpperBound; lower = pd->port_range_hints[port_index].LowerBound; } if (LADSPA_IS_HINT_LOGARITHMIC(hint_descriptor)) { if (lower < FLT_EPSILON) lower = FLT_EPSILON; } if (LADSPA_IS_HINT_HAS_DEFAULT(hint_descriptor)) { if (LADSPA_IS_HINT_DEFAULT_MINIMUM(hint_descriptor)) { return lower; } else if (LADSPA_IS_HINT_DEFAULT_LOW(hint_descriptor)) { if (LADSPA_IS_HINT_LOGARITHMIC(hint_descriptor)) { return exp(log(lower) * 0.75 + log(upper) * 0.25); } else { return lower * 0.75 + upper * 0.25; } } else if (LADSPA_IS_HINT_DEFAULT_MIDDLE(hint_descriptor)) { if (LADSPA_IS_HINT_LOGARITHMIC(hint_descriptor)) { return exp(log(lower) * 0.5 + log(upper) * 0.5); } else { return lower * 0.5 + upper * 0.5; } } else if (LADSPA_IS_HINT_DEFAULT_HIGH(hint_descriptor)) { if (LADSPA_IS_HINT_LOGARITHMIC(hint_descriptor)) { return exp(log(lower) * 0.25 + log(upper) * 0.75); } else { return lower * 0.25 + upper * 0.75; } } else if (LADSPA_IS_HINT_DEFAULT_MAXIMUM(hint_descriptor)) { return upper; } else if (LADSPA_IS_HINT_DEFAULT_0(hint_descriptor)) { return 0.0; } else if (LADSPA_IS_HINT_DEFAULT_1(hint_descriptor)) { if (LADSPA_IS_HINT_SAMPLE_RATE(hint_descriptor)) { return (LADSPA_Data) sample_rate; } else { return 1.0; } } else if (LADSPA_IS_HINT_DEFAULT_100(hint_descriptor)) { if (LADSPA_IS_HINT_SAMPLE_RATE(hint_descriptor)) { return 100.0 * (LADSPA_Data) sample_rate; } else { return 100.0; } } else if (LADSPA_IS_HINT_DEFAULT_440(hint_descriptor)) { if (LADSPA_IS_HINT_SAMPLE_RATE(hint_descriptor)) { return 440.0 * (LADSPA_Data) sample_rate; } else { return 440.0; } } } else { /* try and find a reasonable default */ if (LADSPA_IS_HINT_BOUNDED_BELOW(hint_descriptor)) { return lower; } else if (LADSPA_IS_HINT_BOUNDED_ABOVE(hint_descriptor)) { return upper; } } return 0.0; } LADSPA_Data plugin_desc_change_control_value (plugin_desc_t * pd, unsigned long control_index, LADSPA_Data value, jack_nframes_t old_sample_rate, jack_nframes_t new_sample_rate) { if (LADSPA_IS_HINT_SAMPLE_RATE (pd->port_range_hints[control_index].HintDescriptor)) { LADSPA_Data old_sr, new_sr; old_sr = (LADSPA_Data) old_sample_rate; new_sr = (LADSPA_Data) new_sample_rate; value /= old_sr; value *= new_sr; } return value; } gint plugin_desc_get_copies (plugin_desc_t * pd, unsigned long rack_channels) { gint copies = 1; if (pd->channels > rack_channels) return 0; while (pd->channels * copies < rack_channels) copies++; if (pd->channels * copies > rack_channels) return 0; return copies; } /* EOF */ jack-rack-f9fb65d/src/plugin_desc.h000066400000000000000000000055421151220453700173110ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_PLUGIN_DESC_H__ #define __JR_PLUGIN_DESC_H__ #include #include #include typedef struct _plugin_desc plugin_desc_t; struct _plugin_desc { char * object_file; unsigned long index; unsigned long id; char * name; LADSPA_Properties properties; gboolean rt; unsigned long channels; gboolean aux_are_input; unsigned long aux_channels; unsigned long port_count; LADSPA_PortDescriptor * port_descriptors; LADSPA_PortRangeHint * port_range_hints; char ** port_names; unsigned long * audio_input_port_indicies; unsigned long * audio_output_port_indicies; unsigned long * audio_aux_port_indicies; unsigned long control_port_count; unsigned long * control_port_indicies; }; plugin_desc_t * plugin_desc_new (); plugin_desc_t * plugin_desc_new_with_descriptor (const char * object_file, unsigned long index, const LADSPA_Descriptor * descriptor); void plugin_desc_destroy (); void plugin_desc_set_object_file (plugin_desc_t * pd, const char * object_file); void plugin_desc_set_index (plugin_desc_t * pd, unsigned long index); void plugin_desc_set_id (plugin_desc_t * pd, unsigned long id); void plugin_desc_set_name (plugin_desc_t * pd, const char * name); void plugin_desc_set_properties (plugin_desc_t * pd, LADSPA_Properties properties); struct _plugin * plugin_desc_instantiate (plugin_desc_t * pd); LADSPA_Data plugin_desc_get_default_control_value (plugin_desc_t * pd, unsigned long port_index, jack_nframes_t sample_rate); LADSPA_Data plugin_desc_change_control_value (plugin_desc_t *, unsigned long, LADSPA_Data, jack_nframes_t, jack_nframes_t); gint plugin_desc_get_copies (plugin_desc_t * pd, unsigned long rack_channels); #endif /* __JR_PLUGIN_DESC_H__ */ jack-rack-f9fb65d/src/plugin_mgr.c000066400000000000000000000407431151220453700171550ustar00rootroot00000000000000/* * jack-ladspa-host * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #include "ac_config.h" #include #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_LRDF #include #endif #include "plugin_mgr.h" #include "plugin_desc.h" #include "ui.h" static void plugin_mgr_init_lrdf (ui_t * ui, plugin_mgr_t * plugin_mgr); static gboolean plugin_is_valid (const LADSPA_Descriptor * descriptor) { unsigned long i; unsigned long icount = 0; unsigned long ocount = 0; for (i = 0; i < descriptor->PortCount; i++) { if (!LADSPA_IS_PORT_AUDIO (descriptor->PortDescriptors[i])) continue; if (LADSPA_IS_PORT_INPUT (descriptor->PortDescriptors[i])) icount++; else ocount++; } if (icount == 0 || ocount == 0) return FALSE; return TRUE; } static void plugin_mgr_get_object_file_plugins (ui_t * ui, plugin_mgr_t * plugin_mgr, const char * filename) { const char * dlerr; void * dl_handle; LADSPA_Descriptor_Function get_descriptor; const LADSPA_Descriptor * descriptor; unsigned long plugin_index; plugin_desc_t * desc, * other_desc = NULL; GSList * list; gboolean exists; int err; /* open the object file */ dl_handle = dlopen (filename, RTLD_NOW|RTLD_GLOBAL); if (!dl_handle) { fprintf (stderr, _("%s: error opening shared object file '%s': %s\n"), __FUNCTION__, filename, dlerror()); return; } /* get the get_descriptor function */ dlerror (); /* clear the error report */ get_descriptor = (LADSPA_Descriptor_Function) dlsym (dl_handle, "ladspa_descriptor"); dlerr = dlerror(); if (dlerr) { fprintf (stderr, _("%s: error finding ladspa_descriptor symbol in object file '%s': %s\n"), __FUNCTION__, filename, dlerr); dlclose (dl_handle); return; } plugin_index = 0; while ( (descriptor = get_descriptor (plugin_index)) ) { if (!plugin_is_valid (descriptor)) { plugin_index++; continue; } /* check it doesn't already exist */ exists = FALSE; for (list = plugin_mgr->all_plugins; list; list = g_slist_next (list)) { other_desc = (plugin_desc_t *) list->data; if (other_desc->id == descriptor->UniqueID) { exists = TRUE; break; } } if (exists) { printf (_("Plugin %ld exists in both '%s' and '%s'; using version in '%s'\n"), descriptor->UniqueID, other_desc->object_file, filename, other_desc->object_file); plugin_index++; continue; } desc = plugin_desc_new_with_descriptor (filename, plugin_index, descriptor); plugin_mgr->all_plugins = g_slist_append (plugin_mgr->all_plugins, desc); plugin_index++; plugin_mgr->plugin_count++; /* print in the splash screen */ ui_display_splash_text (ui, _("Loaded plugin '%s'"), desc->name); } err = dlclose (dl_handle); if (err) { fprintf (stderr, _("%s: error closing object file '%s': %s\n"), __FUNCTION__, filename, dlerror ()); } } static void plugin_mgr_get_dir_plugins (ui_t * ui, plugin_mgr_t * plugin_mgr, const char * dir) { DIR * dir_stream; struct dirent * dir_entry; char * file_name; int err; size_t dirlen; dir_stream = opendir (dir); if (!dir_stream) { return; } dirlen = strlen (dir); while ( (dir_entry = readdir (dir_stream)) ) { if (strcmp (dir_entry->d_name, ".") == 0 || strcmp (dir_entry->d_name, "..") == 0) continue; file_name = g_malloc (dirlen + 1 + strlen (dir_entry->d_name) + 1); strcpy (file_name, dir); if (file_name[dirlen - 1] == '/') strcpy (file_name + dirlen, dir_entry->d_name); else { file_name[dirlen] = '/'; strcpy (file_name + dirlen + 1, dir_entry->d_name); } plugin_mgr_get_object_file_plugins (ui, plugin_mgr, file_name); g_free (file_name); } err = closedir (dir_stream); if (err) fprintf (stderr, _("%s: error closing directory '%s': %s\n"), __FUNCTION__, dir, strerror (errno)); } static void plugin_mgr_get_path_plugins (ui_t * ui, plugin_mgr_t * plugin_mgr) { char * ladspa_path, * dir; ladspa_path = g_strdup (getenv ("LADSPA_PATH")); if (!ladspa_path) ladspa_path = g_strdup ("/usr/local/lib/ladspa:/usr/lib/ladspa"); dir = strtok (ladspa_path, ":"); do plugin_mgr_get_dir_plugins (ui, plugin_mgr, dir); while ((dir = strtok (NULL, ":"))); g_free (ladspa_path); } static gint plugin_mgr_sort (gconstpointer a, gconstpointer b) { const plugin_desc_t * da; const plugin_desc_t * db; da = (const plugin_desc_t *) a; db = (const plugin_desc_t *) b; return strcasecmp (da->name, db->name); } plugin_mgr_t * plugin_mgr_new (ui_t * ui) { plugin_mgr_t * pm; pm = g_malloc (sizeof (plugin_mgr_t)); pm->all_plugins = NULL; pm->plugins = NULL; pm->plugin_count = 0; #ifdef HAVE_LRDF pm->lrdf_uris = NULL; plugin_mgr_init_lrdf (ui, pm); #endif plugin_mgr_get_path_plugins (ui, pm); if (!pm->all_plugins) ui_display_error (ui, E_FATAL, _("No LADSPA plugins were found!\n\nCheck your LADSPA_PATH environment variable.")); pm->all_plugins = g_slist_sort (pm->all_plugins, plugin_mgr_sort); return pm; } void plugin_mgr_destroy (plugin_mgr_t * plugin_mgr) { GSList * list; for (list = plugin_mgr->all_plugins; list; list = g_slist_next (list)) plugin_desc_destroy ((plugin_desc_t *) list->data); g_slist_free (plugin_mgr->plugins); g_slist_free (plugin_mgr->all_plugins); free (plugin_mgr); } void plugin_mgr_set_plugins (plugin_mgr_t * plugin_mgr, unsigned long rack_channels) { GSList * list; plugin_desc_t * desc; /* clear the current plugins */ g_slist_free (plugin_mgr->plugins); plugin_mgr->plugins = NULL; for (list = plugin_mgr->all_plugins; list; list = g_slist_next (list)) { desc = (plugin_desc_t *) list->data; if (plugin_desc_get_copies (desc, rack_channels) != 0) plugin_mgr->plugins = g_slist_append (plugin_mgr->plugins, desc); } } static plugin_desc_t * plugin_mgr_find_desc (plugin_mgr_t * plugin_mgr, GSList * plugins, unsigned long id) { GSList * list; plugin_desc_t * desc; for (list = plugins; list; list = g_slist_next (list)) { desc = (plugin_desc_t *) list->data; if (desc->id == id) return desc; } return NULL; } plugin_desc_t * plugin_mgr_get_desc (plugin_mgr_t * plugin_mgr, unsigned long id) { return plugin_mgr_find_desc (plugin_mgr, plugin_mgr->plugins, id); } plugin_desc_t * plugin_mgr_get_any_desc (plugin_mgr_t * plugin_mgr, unsigned long id) { return plugin_mgr_find_desc (plugin_mgr, plugin_mgr->all_plugins, id); } static GtkWidget * plugin_mgr_create_menu_item (plugin_desc_t * plugin, GCallback callback, gpointer data) { GtkWidget * menu_item; char * filename; char * str; const char * rt_component; char * aux_component; filename = strrchr (plugin->object_file, '/'); if (filename) filename++; else filename = plugin->object_file; rt_component = plugin->rt ? "" : _(", NOT RT"); aux_component = plugin->aux_channels == 0 ? g_strdup ("") : g_strdup_printf (_(", %ld aux %s"), plugin->aux_channels, plugin->aux_are_input ? _("in") : _("out")); str = g_strdup_printf ("%s (%s, %ld %s%s%s)", plugin->name, filename, plugin->channels, _("ch"), aux_component, rt_component); g_free (aux_component); menu_item = gtk_menu_item_new_with_label (str); g_free (str); /* use the glib object data stuff to carry the plugin */ g_object_set_data (G_OBJECT (menu_item), "jack-rack-plugin-desc", plugin); g_object_set_data (G_OBJECT (menu_item), "jack-rack-plugin-id", GINT_TO_POINTER(plugin->id)); g_signal_connect (G_OBJECT (menu_item), "activate", callback, data); gtk_widget_show (menu_item); return menu_item; } static GtkWidget * plugin_mgr_create_alphabet_menu (GSList * plugins, GCallback callback, gpointer data) { GtkWidget * menu, * submenu, * menu_item, * submenu_item; plugin_desc_t * plugin; GSList * list; const char * last_name; char letter_str[2]; letter_str[1] = '\0'; last_name = NULL; submenu = NULL; menu = gtk_menu_new (); for (list = plugins; list; list = g_slist_next (list)) { plugin = list->data; if (!last_name || (isdigit(*last_name) && !isdigit(*plugin->name)) || (!isdigit(*last_name) && strncasecmp (last_name, plugin->name, 1) != 0)) /* letter boundary */ { letter_str[0] = toupper (plugin->name[0]); menu_item = gtk_menu_item_new_with_label (letter_str); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); submenu = gtk_menu_new (); gtk_widget_show (submenu); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), submenu); } submenu_item = plugin_mgr_create_menu_item (plugin, callback, data); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), submenu_item); last_name = plugin->name; } return menu; } #ifdef HAVE_LRDF static GtkWidget * plugin_mgr_menu_item (GSList ** plugins, unsigned long id, GCallback callback, gpointer data) { GSList * list; plugin_desc_t * plugin; for (list = *plugins; list; list = g_slist_next (list)) { plugin = (plugin_desc_t *) list->data; if (plugin->id == id) break; } if (!list) return NULL; *plugins = g_slist_remove (*plugins, plugin); return plugin_mgr_create_menu_item (plugin, callback, data); } static GtkWidget * plugin_mgr_menu_descend (GSList ** plugins, const char * uri, const char * base, GCallback callback, gpointer data) { GtkWidget * menu = NULL; GtkWidget * menu_item; lrdf_uris * uris; unsigned int i; uris = lrdf_get_subclasses(uri); if (uris) { GtkWidget * sub_menu; const char * label; char * newbase; for (i = 0; i < uris->count; i++) { /* get the sub menu */ label = lrdf_get_label (uris->items[i]); newbase = g_strdup_printf ("%s/%s", base, label); sub_menu = plugin_mgr_menu_descend (plugins, uris->items[i], newbase, callback, data); /* add it to the menu */ if (sub_menu) { if (!menu) { menu = gtk_menu_new (); gtk_widget_show (menu); } menu_item = gtk_menu_item_new_with_label (label); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), sub_menu); } g_free (newbase); } lrdf_free_uris (uris); } uris = lrdf_get_instances(uri); if (uris) { for (i = 0; i < uris->count; i++) { menu_item = plugin_mgr_menu_item (plugins, (unsigned long) lrdf_get_uid (uris->items[i]), callback, data); if (menu_item) { if (!menu) { menu = gtk_menu_new (); gtk_widget_show (menu); } gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); } } lrdf_free_uris (uris); } return menu; } GtkWidget * plugin_mgr_get_menu (plugin_mgr_t * plugin_mgr, GCallback callback, gpointer data) { GSList * plugins; GtkWidget * main_menu; GtkWidget * alphabet_menu = NULL; GtkWidget * menu_item; plugins = g_slist_copy (plugin_mgr->plugins); main_menu = plugin_mgr_menu_descend (&plugins, LADSPA_BASE "Plugin", "", callback, data); if (g_slist_length (plugins) > 0) { alphabet_menu = plugin_mgr_create_alphabet_menu (plugins, callback, data); g_slist_free (plugins); } if (!main_menu) return alphabet_menu; gtk_widget_hide (main_menu); if (!alphabet_menu) return main_menu; /* add the alphabet menu to the bottom of the lrdf menu */ menu_item = gtk_menu_item_new_with_label (_("Uncategorised")); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (main_menu), menu_item); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), alphabet_menu); gtk_widget_show (alphabet_menu); return main_menu; } #else /* !HAVE_LRDF */ GtkWidget * plugin_mgr_get_menu (plugin_mgr_t * plugin_mgr, GCallback callback, gpointer data) { return plugin_mgr_create_alphabet_menu (plugin_mgr->plugins, callback, data); } #endif /* HAVE_LRDF */ /* lrdf path stuff and whatnot */ #ifdef HAVE_LRDF static void plugin_mgr_get_dir_uris (ui_t * ui, plugin_mgr_t * plugin_mgr, const char * dir) { DIR * dir_stream; struct dirent * dir_entry; char * file_name; int err; size_t dirlen; char * extension; dir_stream = opendir (dir); if (!dir_stream) return; dirlen = strlen (dir); while ( (dir_entry = readdir (dir_stream)) ) { /* check if it's a .rdf or .rdfs */ extension = strrchr (dir_entry->d_name, '.'); if (!extension) continue; if (strcmp (extension, ".rdf") != 0 && strcmp (extension, ".rdfs") != 0) continue; file_name = g_malloc (dirlen + 1 + strlen (dir_entry->d_name) + 1 + 7); strcpy (file_name, "file://"); strcpy (file_name + 7, dir); if ((file_name + 7)[dirlen - 1] == '/') strcpy (file_name + 7 + dirlen, dir_entry->d_name); else { (file_name + 7)[dirlen] = '/'; strcpy (file_name + 7 + dirlen + 1, dir_entry->d_name); } plugin_mgr->lrdf_uris = g_slist_append (plugin_mgr->lrdf_uris, file_name); ui_display_splash_text (ui, _("Found LRDF description file '%s'"), file_name); } err = closedir (dir_stream); if (err) fprintf (stderr, _("%s: error closing directory '%s': %s\n"), __FUNCTION__, dir, strerror (errno)); } static void plugin_mgr_get_path_uris (ui_t * ui, plugin_mgr_t * plugin_mgr) { char * lrdf_path, * dir; lrdf_path = g_strdup (getenv ("LADSPA_RDF_PATH")); if (!lrdf_path) lrdf_path = g_strdup ("/usr/local/share/ladspa/rdf:/usr/share/ladspa/rdf"); dir = strtok (lrdf_path, ":"); do plugin_mgr_get_dir_uris (ui, plugin_mgr, dir); while ((dir = strtok (NULL, ":"))); g_free (lrdf_path); } static void plugin_mgr_init_lrdf (ui_t * ui, plugin_mgr_t * plugin_mgr) { GSList * list; int err; plugin_mgr_get_path_uris (ui, plugin_mgr); lrdf_init (); for (list = plugin_mgr->lrdf_uris; list; list = g_slist_next (list)) { err = lrdf_read_file ((const char *) list->data); if (err) fprintf (stderr, _("%s: could not parse LRDF file '%s'\n"), __FUNCTION__, (const char *) list->data); } } #endif /* HAVE_LRDF */ /* EOF */ jack-rack-f9fb65d/src/plugin_mgr.h000066400000000000000000000033121151220453700171510ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_PLUGIN_MANAGER_H__ #define __JR_PLUGIN_MANAGER_H__ #include "ac_config.h" #include #include "plugin_desc.h" typedef struct _plugin_mgr plugin_mgr_t; struct _plugin_mgr { GSList * all_plugins; GSList * plugins; unsigned long plugin_count; #ifdef HAVE_LRDF GSList * lrdf_uris; #endif }; struct _ui; plugin_mgr_t * plugin_mgr_new (struct _ui * ui); void plugin_mgr_destroy (plugin_mgr_t * plugin_mgr); void plugin_mgr_set_plugins (plugin_mgr_t * plugin_mgr, unsigned long rack_channels); plugin_desc_t * plugin_mgr_get_desc (plugin_mgr_t * plugin_mgr, unsigned long id); plugin_desc_t * plugin_mgr_get_any_desc (plugin_mgr_t * plugin_mgr, unsigned long id); GtkWidget * plugin_mgr_get_menu (plugin_mgr_t * plugin_mgr, GCallback callback, gpointer data); #endif /* __JR_PLUGIN_MANAGER_H__ */ jack-rack-f9fb65d/src/plugin_settings.c000066400000000000000000000244141151220453700202250ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2003 (node@users.sourceforge.net) * * 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. */ #define _GNU_SOURCE #include #include "plugin_settings.h" static void settings_set_to_default (settings_t * settings, jack_nframes_t sample_rate) { unsigned long control; guint copy; LADSPA_Data value; for (control = 0; control < settings->desc->control_port_count; control++) { value = plugin_desc_get_default_control_value (settings->desc, settings->desc->control_port_indicies[control], sample_rate); for (copy = 0; copy < settings->copies; copy++) { settings->control_values[copy][control] = value; } settings->locks[control] = TRUE; } } settings_t * settings_new (plugin_desc_t * desc, unsigned long channels, jack_nframes_t sample_rate) { settings_t * settings; unsigned long channel; guint copies; settings = g_malloc (sizeof (settings_t)); copies = plugin_desc_get_copies (desc, channels); settings->sample_rate = sample_rate; settings->desc = desc; settings->copies = copies; settings->channels = channels; settings->lock_all = TRUE; settings->enabled = FALSE; settings->locks = NULL; settings->control_values = NULL; settings->wet_dry_enabled = FALSE; settings->wet_dry_locked = TRUE; /* control settings */ if (desc->control_port_count > 0) { guint copy; settings->locks = g_malloc (sizeof (gboolean) * desc->control_port_count); settings->control_values = g_malloc (sizeof (LADSPA_Data *) * copies); for (copy = 0; copy < copies; copy++) { settings->control_values[copy] = g_malloc (sizeof (LADSPA_Data) * desc->control_port_count); } settings_set_to_default (settings, sample_rate); } /* wet/dry settings */ settings->wet_dry_values = g_malloc (sizeof (LADSPA_Data) * channels); for (channel = 0; channel < channels; channel++) settings->wet_dry_values[channel] = 1.0; return settings; } settings_t * settings_dup (settings_t * other) { settings_t * settings; plugin_desc_t * desc; unsigned long channel; settings = g_malloc (sizeof (settings_t)); settings->sample_rate = other->sample_rate; settings->desc = other->desc; settings->copies = settings_get_copies (other); settings->channels = settings_get_channels (other); settings->wet_dry_enabled = settings_get_wet_dry_enabled (other); settings->wet_dry_locked = settings_get_wet_dry_locked (other); settings->lock_all = settings_get_lock_all (other); settings->enabled = settings_get_enabled (other); settings->locks = NULL; settings->control_values = NULL; desc = other->desc; if (desc->control_port_count > 0) { guint copy; unsigned long control; settings->locks = g_malloc (sizeof (gboolean) * desc->control_port_count); for (control = 0; control < desc->control_port_count; control++) settings_set_lock (settings, control, settings_get_lock (other, control)); settings->control_values = g_malloc (sizeof (LADSPA_Data *) * settings->copies); for (copy = 0; copy < settings->copies; copy++) { settings->control_values[copy] = g_malloc (sizeof (LADSPA_Data) * desc->control_port_count); for (control = 0; control < desc->control_port_count; control++) { settings->control_values[copy][control] = settings_get_control_value (other, copy, control); } } } settings->wet_dry_values = g_malloc (sizeof (LADSPA_Data) * settings->channels); for (channel = 0; channel < settings->channels; channel++) settings->wet_dry_values[channel] = settings_get_wet_dry_value (other, channel); return settings; } void settings_destroy (settings_t * settings) { if (settings->desc->control_port_count > 0) { guint i; for (i = 0; i < settings->copies; i++) g_free (settings->control_values[i]); g_free (settings->control_values); g_free (settings->locks); } g_free (settings->wet_dry_values); g_free (settings); } static void settings_set_copies (settings_t * settings, guint copies) { guint copy; guint last_copy; unsigned long control; if (copies <= settings->copies) return; last_copy = settings->copies - 1; settings->control_values = g_realloc (settings->control_values, sizeof (LADSPA_Data *) * copies); /* copy over the last settings to the new copies */ for (copy = settings->copies; copy < copies; copy++) { for (control = 0; control < settings->desc->control_port_count; control++) { settings->control_values[copy][control] = settings->control_values[last_copy][control]; } } settings->copies = copies; } static void settings_set_channels (settings_t * settings, unsigned long channels) { unsigned long channel; LADSPA_Data last_value; if (channels <= settings->channels) return; settings->wet_dry_values = g_realloc (settings->wet_dry_values, sizeof (LADSPA_Data) * channels); last_value = settings->wet_dry_values[settings->channels - 1]; for (channel = settings->channels; channel < channels; channel++) settings->wet_dry_values[channel] = last_value; settings->channels = channels; } void settings_set_sample_rate (settings_t * settings, jack_nframes_t sample_rate) { LADSPA_Data old_sample_rate; LADSPA_Data new_sample_rate; g_return_if_fail (settings != NULL); if (settings->sample_rate == sample_rate) return; if (settings->desc->control_port_count > 0) { unsigned long control; guint copy; new_sample_rate = (LADSPA_Data) sample_rate; old_sample_rate = (LADSPA_Data) settings->sample_rate; for (control = 0; control < settings->desc->control_port_count; control++) { for (copy = 0; copy < settings->copies; copy++) { if (LADSPA_IS_HINT_SAMPLE_RATE (settings->desc->port_range_hints[control].HintDescriptor)) { settings->control_values[copy][control] = (settings->control_values[copy][control] / old_sample_rate) * new_sample_rate; } } } } settings->sample_rate = sample_rate; } void settings_set_control_value (settings_t * settings, guint copy, unsigned long control_index, LADSPA_Data value) { g_return_if_fail (settings != NULL); g_return_if_fail (control_index < settings->desc->control_port_count); if (copy >= settings->copies) settings_set_copies (settings, copy + 1); settings->control_values[copy][control_index] = value; } void settings_set_lock (settings_t * settings, unsigned long control_index, gboolean locked) { g_return_if_fail (settings != NULL); g_return_if_fail (control_index < settings->desc->control_port_count); settings->locks[control_index] = locked; } void settings_set_lock_all (settings_t * settings, gboolean lock_all) { g_return_if_fail (settings != NULL); settings->lock_all = lock_all; } void settings_set_enabled (settings_t * settings, gboolean enabled) { g_return_if_fail (settings != NULL); settings->enabled = enabled; } void settings_set_wet_dry_enabled (settings_t * settings, gboolean enabled) { g_return_if_fail (settings != NULL); settings->wet_dry_enabled = enabled; } void settings_set_wet_dry_locked (settings_t * settings, gboolean locked) { g_return_if_fail (settings != NULL); settings->wet_dry_locked = locked; } void settings_set_wet_dry_value (settings_t * settings, unsigned long channel, LADSPA_Data value) { g_return_if_fail (settings != NULL); if (channel >= settings->channels) settings_set_channels (settings, channel + 1); settings->wet_dry_values[channel] = value; } LADSPA_Data settings_get_control_value (settings_t * settings, guint copy, unsigned long control_index) { g_return_val_if_fail (settings != NULL, NAN); g_return_val_if_fail (control_index < settings->desc->control_port_count, NAN); if (copy >= settings->copies) settings_set_copies (settings, copy - 1); return settings->control_values[copy][control_index]; } gboolean settings_get_lock (const settings_t * settings, unsigned long control_index) { g_return_val_if_fail (settings != NULL, FALSE); return settings->locks[control_index]; } gboolean settings_get_lock_all (const settings_t * settings) { g_return_val_if_fail (settings != NULL, FALSE); return settings->lock_all; } gboolean settings_get_enabled (const settings_t * settings) { g_return_val_if_fail (settings != NULL, FALSE); return settings->enabled; } guint settings_get_copies (const settings_t * settings) { g_return_val_if_fail (settings != NULL, 0); return settings->copies; } unsigned long settings_get_channels (const settings_t * settings) { g_return_val_if_fail (settings != NULL, 0); return settings->channels; } gboolean settings_get_wet_dry_enabled (const settings_t * settings) { g_return_val_if_fail (settings != NULL, FALSE); return settings->wet_dry_enabled; } gboolean settings_get_wet_dry_locked (const settings_t * settings) { g_return_val_if_fail (settings != NULL, FALSE); return settings->wet_dry_locked; } LADSPA_Data settings_get_wet_dry_value (settings_t * settings, unsigned long channel) { g_return_val_if_fail (settings != NULL, 0); if (channel >= settings->channels) settings_set_channels (settings, channel + 1); return settings->wet_dry_values[channel]; } /* EOF */ jack-rack-f9fb65d/src/plugin_settings.h000066400000000000000000000060561151220453700202340ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_PLUGIN_SETTINGS_H__ #define __JR_PLUGIN_SETTINGS_H__ #include #include #include #include "plugin_mgr.h" #include "plugin_desc.h" typedef struct _settings settings_t; struct _settings { jack_nframes_t sample_rate; plugin_desc_t * desc; guint copies; LADSPA_Data ** control_values; gboolean * locks; gboolean lock_all; gboolean enabled; unsigned long channels; gboolean wet_dry_enabled; gboolean wet_dry_locked; LADSPA_Data * wet_dry_values; }; settings_t * settings_new (plugin_desc_t * desc, unsigned long channels, jack_nframes_t sample_rate); settings_t * settings_dup (settings_t * settings); void settings_destroy (settings_t * settings); void settings_set_control_value (settings_t * settings, guint copy, unsigned long control_index, LADSPA_Data value); void settings_set_lock (settings_t * settings, unsigned long control_index, gboolean locked); void settings_set_lock_all (settings_t * settings, gboolean lock_all); void settings_set_enabled (settings_t * settings, gboolean enabled); void settings_set_wet_dry_enabled (settings_t * settings, gboolean enabled); void settings_set_wet_dry_locked (settings_t * settings, gboolean locked); void settings_set_wet_dry_value (settings_t * settings, unsigned long channel, LADSPA_Data value); LADSPA_Data settings_get_control_value (settings_t * settings, guint copy, unsigned long control_index); gboolean settings_get_lock (const settings_t * settings, unsigned long control_index); gboolean settings_get_lock_all (const settings_t * settings); gboolean settings_get_enabled (const settings_t * settings); guint settings_get_copies (const settings_t * settings); unsigned long settings_get_channels (const settings_t * settings); gboolean settings_get_wet_dry_enabled (const settings_t * settings); gboolean settings_get_wet_dry_locked (const settings_t * settings); LADSPA_Data settings_get_wet_dry_value (settings_t * settings, unsigned long channel); void settings_set_sample_rate (settings_t * settings, jack_nframes_t sample_rate); #endif /* __JR_PLUGIN_SETTINGS_H__ */ jack-rack-f9fb65d/src/plugin_slot.c000066400000000000000000000606031151220453700173460ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #include #include #include #include #include #include #include #include #include "plugin_slot.h" #include "plugin_slot_callbacks.h" #include "ui_callbacks.h" #include "plugin_mgr.h" #include "jack_rack.h" #include "process.h" #include "ui.h" #include "globals.h" #include "control_message.h" #include "file.h" #define TEXT_BOX_WIDTH 75 #define CONTROL_FIFO_SIZE 256 #define TEXT_BOX_CHARS -1 void plugin_slot_show_wet_dry_controls (plugin_slot_t * plugin_slot) { if (settings_get_wet_dry_enabled (plugin_slot->settings)) { gtk_widget_show (plugin_slot->wet_dry_controls->control_box); if (plugin_slot->jack_rack->channels > 1) { unsigned long channel; gboolean locked; locked = settings_get_wet_dry_locked (plugin_slot->settings); if (locked) gtk_widget_hide (plugin_slot->wet_dry_controls->labels[0]); else gtk_widget_show (plugin_slot->wet_dry_controls->labels[0]); for (channel = 1; channel < plugin_slot->jack_rack->channels; channel++) if (locked) { gtk_widget_hide (plugin_slot->wet_dry_controls->controls[channel]); gtk_widget_hide (plugin_slot->wet_dry_controls->labels[channel]); } else { gtk_widget_show (plugin_slot->wet_dry_controls->controls[channel]); gtk_widget_show (plugin_slot->wet_dry_controls->labels[channel]); } } } else gtk_widget_hide (plugin_slot->wet_dry_controls->control_box); } void plugin_slot_show_controls (plugin_slot_t * plugin_slot, guint copy_to_show) { port_controls_t * port_controls; unsigned long control; guint copy; gboolean lock_all; if (plugin_slot->plugin->desc->control_port_count == 0 || plugin_slot->plugin->copies < 2) return; if (copy_to_show >= plugin_slot->plugin->copies) copy_to_show = 0; lock_all = settings_get_lock_all (plugin_slot->settings); for (control = 0; control < plugin_slot->plugin->desc->control_port_count; control++) { port_controls = plugin_slot->port_controls + control; for (copy = 0; copy < plugin_slot->plugin->copies; copy++) { if ((copy != copy_to_show) && (lock_all || port_controls->locked)) { gtk_widget_hide (port_controls->controls[copy].control); if (port_controls->type == JR_CTRL_FLOAT) { gtk_widget_hide (port_controls->controls[copy].text); } } else { gtk_widget_show (port_controls->controls[copy].control); if (port_controls->type == JR_CTRL_FLOAT) { gtk_widget_show (port_controls->controls[copy].text); } } } if (lock_all) gtk_widget_hide (port_controls->lock); else gtk_widget_show (port_controls->lock); } } /** * Adjust GUI controls to reflect plugin settings */ void plugin_slot_set_port_controls (plugin_slot_t *plugin_slot, port_controls_t *port_controls, gboolean block_callbacks) { LADSPA_Data value; guint copy; for (copy = 0; copy < plugin_slot->plugin->copies; copy++) { value = settings_get_control_value (plugin_slot->settings, copy, port_controls->control_index); switch (port_controls->type) { case JR_CTRL_FLOAT: { gdouble logval; gchar *str; logval = (port_controls->logarithmic ? log (value) : value); if (block_callbacks) port_controls_block_float_callback (port_controls, copy); gtk_range_set_value (GTK_RANGE (port_controls->controls[copy].control), logval); /* XXX */ /* possibly set our peers */ if (port_controls->plugin_slot->plugin->copies > 1 && port_controls->locked) { guint i; for (i = 0; i < port_controls->plugin_slot->plugin->copies; i++) { if (i != copy) gtk_range_set_value (GTK_RANGE(port_controls->controls[i].control), gtk_range_get_value (GTK_RANGE (port_controls->controls[copy].control))); } } /* */ if (block_callbacks) port_controls_unblock_float_callback (port_controls, copy); str = g_strdup_printf ("%f", value); gtk_entry_set_text (GTK_ENTRY (port_controls->controls[copy].text), str); g_free (str); break; } case JR_CTRL_INT: if (block_callbacks) port_controls_block_int_callback (port_controls, copy); gtk_spin_button_set_value (GTK_SPIN_BUTTON (port_controls->controls[copy].control), value); if (block_callbacks) port_controls_unblock_int_callback (port_controls, copy); break; case JR_CTRL_POINTS: { GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (port_controls->controls[copy].control)); GtkTreeIter iter; gboolean is_first = TRUE, valid; GtkTreeIter nearest_iter; gfloat nearest_diff; if (block_callbacks) port_controls_block_points_callback (port_controls, copy); /* Select the nearest point to the current value. */ gtk_tree_model_get_iter_first (model, &iter); do { float this_diff; gtk_tree_model_get (model, &iter, 1, &this_diff, -1); this_diff = fabs (this_diff - value); if (is_first || this_diff < nearest_diff) { nearest_iter = iter; nearest_diff = this_diff; } is_first = FALSE; valid = gtk_tree_model_iter_next (model, &iter); } while (valid); gtk_combo_box_set_active_iter (GTK_COMBO_BOX (port_controls->controls[copy].control), &nearest_iter); if (block_callbacks) port_controls_unblock_points_callback (port_controls, copy); break; } case JR_CTRL_BOOL: if (block_callbacks) port_controls_block_bool_callback (port_controls, copy); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (port_controls->controls[copy].control), value > 0.0 ? TRUE : FALSE); if (block_callbacks) port_controls_unblock_bool_callback (port_controls, copy); break; } } } void plugin_slot_set_wet_dry_controls (plugin_slot_t *plugin_slot, gboolean block_callbacks) { unsigned long channel; for (channel = 0; channel < plugin_slot->jack_rack->channels; channel++) { if (block_callbacks) wet_dry_controls_block_callback (plugin_slot->wet_dry_controls, channel); gtk_range_set_value (GTK_RANGE (plugin_slot->wet_dry_controls->controls[channel]), settings_get_wet_dry_value (plugin_slot->settings, channel)); if (block_callbacks) wet_dry_controls_unblock_callback (plugin_slot->wet_dry_controls, channel); } if (plugin_slot->jack_rack->channels > 1) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (plugin_slot->wet_dry_controls->lock), settings_get_wet_dry_locked (plugin_slot->settings)); } static void plugin_slot_set_controls (plugin_slot_t * plugin_slot, settings_t * settings) { plugin_t * plugin; plugin_desc_t * desc; unsigned long control; guint copies; plugin = plugin_slot->plugin; desc = plugin->desc; copies = plugin->copies; /* wet/dry controls */ plugin_slot_set_wet_dry_controls (plugin_slot, FALSE); if (desc->control_port_count == 0) return; if (copies > 1) { gboolean lock_all; gboolean lock; lock_all = settings_get_lock_all (settings); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(plugin_slot->lock_all), lock_all); for (control = 0; control < desc->control_port_count; control++) { lock = settings_get_lock (settings, control); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(plugin_slot->port_controls[control].lock), lock); plugin_slot->port_controls[control].locked = lock_all ? TRUE : lock; } } for (control = 0; control < desc->control_port_count; control++) plugin_slot_set_port_controls (plugin_slot, plugin_slot->port_controls + control, FALSE); } static void plugin_slot_create_lock_all_button (plugin_slot_t * plugin_slot) { plugin_slot->lock_all = gtk_toggle_button_new_with_label (_("Lock All")); g_signal_connect (G_OBJECT (plugin_slot->lock_all), "toggled", G_CALLBACK (slot_lock_all_cb), plugin_slot); gtk_widget_show (plugin_slot->lock_all); gtk_box_pack_end (GTK_BOX (plugin_slot->top_controls), plugin_slot->lock_all, FALSE, FALSE, 0); } static void plugin_slot_create_control_table (plugin_slot_t * plugin_slot) { if (plugin_slot->plugin->desc->control_port_count > 0) { guint copies = plugin_slot->plugin->copies; plugin_slot->control_table = gtk_table_new (plugin_slot->plugin->desc->control_port_count, (copies > 1) ? 3 : 2, FALSE); gtk_widget_show (plugin_slot->control_table); gtk_box_pack_start (GTK_BOX (plugin_slot->main_vbox), plugin_slot->control_table, FALSE, FALSE, 0); /* fill the control table and create the port controls */ plugin_slot->port_controls = port_controls_new (plugin_slot); } else { plugin_slot->port_controls = NULL; plugin_slot->control_table = NULL; } } static void plugin_slot_init_gui (plugin_slot_t * plugin_slot) { gchar *str; GtkWidget * slot_up; /* button */ GtkWidget * slot_up_image; /* button */ GtkWidget * slot_remove; /* button */ GtkWidget * slot_remove_image; /* button */ GtkWidget * slot_down; /* button */ GtkWidget * slot_down_image; /* button */ /* main vbox */ plugin_slot->main_vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (plugin_slot->main_vbox); /* top control box */ plugin_slot->top_controls = gtk_hbox_new (FALSE, 0); gtk_widget_show (plugin_slot->top_controls); gtk_box_pack_start (GTK_BOX (plugin_slot->main_vbox), plugin_slot->top_controls, FALSE, FALSE, 0); /* plugin selector menu thingy */ plugin_slot->plugin_selector = gtk_button_new_with_label (plugin_slot->plugin->desc->name); gtk_widget_show (plugin_slot->plugin_selector); plugin_slot->plugin_menu = plugin_mgr_get_menu (plugin_slot->jack_rack->ui->plugin_mgr, G_CALLBACK (slot_change_cb), plugin_slot); g_signal_connect_swapped (G_OBJECT (plugin_slot->plugin_selector), "event", G_CALLBACK (plugin_button_cb), G_OBJECT (plugin_slot->plugin_menu)); gtk_box_pack_start (GTK_BOX (plugin_slot->top_controls), plugin_slot->plugin_selector, FALSE, FALSE, 0); /* slot up */ slot_up = gtk_button_new (); gtk_widget_show (slot_up); str = g_strconcat (PKGDATADIR, "/jr-up-arrow.png", NULL); slot_up_image = gtk_image_new_from_file (str); g_free (str); g_object_set_data (G_OBJECT (slot_up), "jack-rack-up", GINT_TO_POINTER (1)); gtk_widget_show (slot_up_image); gtk_container_add (GTK_CONTAINER (slot_up), slot_up_image); g_signal_connect (G_OBJECT (slot_up), "clicked", G_CALLBACK (slot_move_cb), plugin_slot); gtk_box_pack_start (GTK_BOX (plugin_slot->top_controls), slot_up, FALSE, FALSE, 0); /* slot remove */ slot_remove = gtk_button_new (); gtk_widget_show (slot_remove); str = g_strconcat (PKGDATADIR, "/jr-cross.png", NULL); slot_remove_image = gtk_image_new_from_file (str); g_free (str); gtk_widget_show (slot_remove_image); gtk_container_add (GTK_CONTAINER (slot_remove), slot_remove_image); g_signal_connect (G_OBJECT (slot_remove), "clicked", G_CALLBACK (slot_remove_cb), plugin_slot); gtk_box_pack_start (GTK_BOX (plugin_slot->top_controls), slot_remove, FALSE, FALSE, 0); /* slot down */ slot_down = gtk_button_new (); gtk_widget_show (slot_down); str = g_strconcat (PKGDATADIR, "/jr-down-arrow.png", NULL); slot_down_image = gtk_image_new_from_file (str); g_free (str); g_object_set_data (G_OBJECT (slot_down), "jack-rack-up", GINT_TO_POINTER (0)); gtk_widget_show (slot_down_image); gtk_container_add (GTK_CONTAINER (slot_down), slot_down_image); g_signal_connect (G_OBJECT (slot_down), "clicked", G_CALLBACK (slot_move_cb), plugin_slot); gtk_box_pack_start (GTK_BOX (plugin_slot->top_controls), slot_down, FALSE, FALSE, 0); /* enable button */ plugin_slot->enable = gtk_toggle_button_new_with_label (_("Enable")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (plugin_slot->enable), FALSE); g_signal_connect (G_OBJECT (plugin_slot->enable), "button-press-event", G_CALLBACK (slot_ablise_cb), plugin_slot); gtk_widget_show (plugin_slot->enable); gtk_box_pack_start (GTK_BOX (plugin_slot->top_controls), plugin_slot->enable, FALSE, FALSE, 0); /* wet/dry button */ plugin_slot->wet_dry = gtk_toggle_button_new_with_label (_("Wet/Dry")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (plugin_slot->wet_dry), FALSE); g_signal_connect (G_OBJECT (plugin_slot->wet_dry), "button-press-event", G_CALLBACK (slot_wet_dry_cb), plugin_slot); gtk_widget_show (plugin_slot->wet_dry); gtk_box_pack_start (GTK_BOX (plugin_slot->top_controls), plugin_slot->wet_dry, FALSE, FALSE, 0); /* sort out the port controls */ if (plugin_slot->plugin->copies > 1 && plugin_slot->plugin->desc->control_port_count > 0) plugin_slot_create_lock_all_button (plugin_slot); else plugin_slot->lock_all = NULL; /* control table */ plugin_slot_create_control_table (plugin_slot); /* wet/dry controls */ plugin_slot->wet_dry_controls = wet_dry_controls_new (plugin_slot); gtk_box_pack_start (GTK_BOX (plugin_slot->main_vbox), plugin_slot->wet_dry_controls->control_box, TRUE, FALSE, 0); /* final seperator bar */ plugin_slot->separator = gtk_hseparator_new (); gtk_widget_show (plugin_slot->separator); gtk_box_pack_start (GTK_BOX (plugin_slot->main_vbox), plugin_slot->separator, FALSE, FALSE, 4); } plugin_slot_t * plugin_slot_new (jack_rack_t * jack_rack, plugin_t * plugin, saved_plugin_t * saved_plugin) { plugin_slot_t * plugin_slot; plugin_slot = g_malloc (sizeof (plugin_slot_t)); plugin_slot->jack_rack = jack_rack; plugin_slot->plugin = plugin; #ifdef HAVE_ALSA plugin_slot->midi_controls = NULL; #endif /* create plugin settings */ plugin_slot->settings = saved_plugin ? saved_plugin->settings : settings_new (plugin->desc, jack_rack->channels, sample_rate); /* create the gui */ plugin_slot_init_gui (plugin_slot); /* set the controls */ plugin_slot_set_controls (plugin_slot, plugin_slot->settings); plugin_slot_show_controls (plugin_slot, 0); plugin_slot_show_wet_dry_controls (plugin_slot); /* add the midi controls */ if (saved_plugin) { #ifdef HAVE_ALSA GSList *list; midi_control_t *midi_ctrl; midi_control_t *new_midi_ctrl = NULL; for (list = saved_plugin->midi_controls; list; list = g_slist_next (list)) { midi_ctrl = list->data; switch(midi_ctrl->ctrl_type) { case LADSPA_CONTROL: new_midi_ctrl = ladspa_midi_control_new (plugin_slot, midi_ctrl->control.ladspa.copy, midi_ctrl->control.ladspa.control); break; case WET_DRY_CONTROL: new_midi_ctrl = wet_dry_midi_control_new (plugin_slot, midi_ctrl->control.wet_dry.channel); break; case PLUGIN_ENABLE_CONTROL: new_midi_ctrl = toggle_midi_control_new (plugin_slot); break; } midi_control_set_midi_channel (new_midi_ctrl, midi_ctrl->midi_channel); midi_control_set_midi_param (new_midi_ctrl, midi_ctrl->midi_param); midi_control_set_min_value (new_midi_ctrl, midi_ctrl->min); midi_control_set_max_value (new_midi_ctrl, midi_ctrl->max); plugin_slot_add_midi_control (plugin_slot, new_midi_ctrl); g_free (midi_ctrl); } g_slist_free (saved_plugin->midi_controls); #endif /* HAVE_ALSA */ g_free (saved_plugin); } return plugin_slot; } void plugin_slot_destroy (plugin_slot_t * plugin_slot) { gtk_widget_destroy (plugin_slot->plugin_menu); gtk_widget_destroy (plugin_slot->main_vbox); g_free (plugin_slot->port_controls); wet_dry_controls_destroy (plugin_slot->wet_dry_controls); g_free (plugin_slot); } void plugin_slot_change_plugin (plugin_slot_t * plugin_slot, plugin_t * plugin) { /* sort out the lock all button */ if (plugin->copies > 1 && plugin->desc->control_port_count > 0 && !plugin_slot->lock_all) { plugin_slot_create_lock_all_button (plugin_slot); } if ((plugin->copies == 1 && plugin_slot->lock_all) || (plugin->copies > 1 && plugin_slot->lock_all && plugin->desc->control_port_count == 0)) { gtk_widget_destroy (plugin_slot->lock_all); plugin_slot->lock_all = NULL; } #ifdef HAVE_ALSA /* remove controls for this plugin */ plugin_slot_remove_midi_controls (plugin_slot); #endif /* kill all the control stuff */ if (plugin_slot->control_table) { gtk_widget_destroy (plugin_slot->control_table); g_free (plugin_slot->port_controls); plugin_slot->control_table = NULL; } gtk_button_set_label (GTK_BUTTON (plugin_slot->plugin_selector), plugin->desc->name); plugin_slot->plugin = plugin; settings_destroy (plugin_slot->settings); plugin_slot->settings = settings_new (plugin->desc, plugin_slot->jack_rack->channels, sample_rate); /* create the new port controls */ if (plugin->desc->control_port_count > 0) { plugin_slot_create_control_table (plugin_slot); plugin_slot_set_controls (plugin_slot, plugin_slot->settings); } plugin_slot_show_wet_dry_controls (plugin_slot); /* move the separator */ gtk_box_reorder_child (GTK_BOX (plugin_slot->main_vbox), plugin_slot->separator, plugin->desc->control_port_count + 1); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (plugin_slot->enable), FALSE); } void plugin_slot_send_ablise (plugin_slot_t * plugin_slot, gboolean enable) { ctrlmsg_t ctrlmsg; ctrlmsg.type = CTRLMSG_ABLE; ctrlmsg.data.ablise.plugin = plugin_slot->plugin; ctrlmsg.data.ablise.enable = enable; ctrlmsg.data.ablise.plugin_slot = plugin_slot; lff_write (plugin_slot->jack_rack->ui->ui_to_process, &ctrlmsg); } void plugin_slot_send_ablise_wet_dry (plugin_slot_t * plugin_slot, gboolean enable) { ctrlmsg_t ctrlmsg; ctrlmsg.type = CTRLMSG_ABLE_WET_DRY; ctrlmsg.data.ablise.plugin = plugin_slot->plugin; ctrlmsg.data.ablise.enable = enable; ctrlmsg.data.ablise.plugin_slot = plugin_slot; lff_write (plugin_slot->jack_rack->ui->ui_to_process, &ctrlmsg); } void plugin_slot_send_change_plugin (plugin_slot_t *plugin_slot, plugin_desc_t *desc) { plugin_t *plugin; ctrlmsg_t ctrlmsg; plugin = jack_rack_instantiate_plugin (global_ui->jack_rack, desc); if (!plugin) return; ctrlmsg.type = CTRLMSG_CHANGE; ctrlmsg.data.change.old_plugin = plugin_slot->plugin; ctrlmsg.data.change.new_plugin = plugin; ctrlmsg.data.change.plugin_slot = plugin_slot; lff_write (plugin_slot->jack_rack->ui->ui_to_process, &ctrlmsg); } void plugin_slot_set_wet_dry_locked (plugin_slot_t *plugin_slot, gboolean locked) { GSList * list; #ifdef HAVE_ALSA midi_control_t * midi_ctrl; #endif settings_set_wet_dry_locked (plugin_slot->settings, locked); #ifdef HAVE_ALSA for (list = plugin_slot->midi_controls; list; list = g_slist_next (list)) { midi_ctrl = (midi_control_t *) list->data; if (midi_ctrl->ctrl_type == WET_DRY_CONTROL) midi_control_set_locked (midi_ctrl, locked); } #endif plugin_slot_show_wet_dry_controls (plugin_slot); } void plugin_slot_set_lock_all (plugin_slot_t *plugin_slot, gboolean lock_all, guint lock_copy) { GSList * list; unsigned long i; #ifdef HAVE_ALSA midi_control_t * midi_ctrl; #endif settings_set_lock_all (plugin_slot->settings, lock_all); for (i = 0; i < plugin_slot->plugin->desc->control_port_count; i++) if (lock_all) plugin_slot->port_controls[i].locked = TRUE; else plugin_slot->port_controls[i].locked = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(plugin_slot->port_controls[i].lock)); #ifdef HAVE_ALSA for (list = plugin_slot->midi_controls; list; list = g_slist_next (list)) { midi_ctrl = (midi_control_t *) list->data; if (midi_ctrl->ctrl_type == LADSPA_CONTROL) { midi_control_set_locked (midi_ctrl, lock_all ? TRUE : plugin_slot->port_controls[midi_ctrl->control.ladspa.control].locked); } } #endif /* HAVE_ALSA */ plugin_slot_show_controls (plugin_slot, lock_copy); } #ifdef HAVE_ALSA void plugin_slot_add_midi_control (plugin_slot_t *plugin_slot, midi_control_t *midi_ctrl) { ctrlmsg_t ctrlmsg; ctrlmsg.type = CTRLMSG_MIDI_ADD; ctrlmsg.data.midi.midi_control = midi_ctrl; lff_write (plugin_slot->jack_rack->ui->ui_to_midi, &ctrlmsg); } void plugin_slot_remove_midi_controls (plugin_slot_t *plugin_slot) { GSList * list; midi_control_t *midi_ctrl; ctrlmsg_t ctrlmsg; for (list = plugin_slot->midi_controls; list; list = g_slist_next (list)) { midi_ctrl = list->data; ctrlmsg.type = CTRLMSG_MIDI_REMOVE; ctrlmsg.data.midi.midi_control = midi_ctrl; lff_write (plugin_slot->jack_rack->ui->ui_to_midi, &ctrlmsg); } g_slist_free (plugin_slot->midi_controls); plugin_slot->midi_controls = NULL; } #endif /* HAVE_ALSA */ /* EOF */ jack-rack-f9fb65d/src/plugin_slot.h000066400000000000000000000062611151220453700173530ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_PLUGIN_SLOT_H__ #define __JR_PLUGIN_SLOT_H__ #include #include #include "ac_config.h" #include "plugin.h" #include "port_controls.h" #include "wet_dry_controls.h" #include "plugin_settings.h" #include "midi_control.h" typedef struct _plugin_slot plugin_slot_t; struct _jack_rack; struct _saved_plugin; /** a slot in the main gui's box of plugin controls. this contains all the widgets and plugin data for the slot */ struct _plugin_slot { struct _jack_rack *jack_rack; wet_dry_controls_t *wet_dry_controls; plugin_t *plugin; settings_t *settings; /* port controls *array* */ port_controls_t *port_controls; #ifdef HAVE_ALSA GSList *midi_controls; #endif /* widgets */ GtkWidget *main_vbox; GtkWidget *top_controls; GtkWidget *lock_all; GtkWidget *control_table; GtkWidget *separator; GtkWidget *plugin_selector; GtkWidget *enable; GtkWidget *wet_dry; GtkWidget *plugin_menu; }; plugin_slot_t * plugin_slot_new (struct _jack_rack *jack_rack, plugin_t *plugin, struct _saved_plugin * saved_plugin); void plugin_slot_destroy (plugin_slot_t *plugin_slot); void plugin_slot_send_ablise (plugin_slot_t *plugin_slot, gboolean enabled); void plugin_slot_send_ablise_wet_dry (plugin_slot_t *plugin_slot, gboolean enabled); void plugin_slot_send_change_plugin (plugin_slot_t *plugin_slot, plugin_desc_t *desc); void plugin_slot_change_plugin (plugin_slot_t *plugin_slot, plugin_t *plugin); void plugin_slot_remove_midi_controls (plugin_slot_t *plugin_slot); void plugin_slot_show_controls (plugin_slot_t *plugin_slot, guint copy_to_show); void plugin_slot_show_wet_dry_controls (plugin_slot_t *plugin_slot); void plugin_slot_set_wet_dry_controls (plugin_slot_t *plugin_slot, gboolean block_callbacks); void plugin_slot_set_port_controls (plugin_slot_t *plugin_slot, port_controls_t *port_controls, gboolean block_callbacks); void plugin_slot_set_wet_dry_locked (plugin_slot_t *plugin_slot, gboolean locked); void plugin_slot_set_lock_all (plugin_slot_t *plugin_slot, gboolean lock_all, guint lock_copy); #ifdef HAVE_ALSA void plugin_slot_add_midi_control (plugin_slot_t *plugin_slot, midi_control_t *midi_ctrl); #endif #endif /* __JR_PLUGIN_SLOT_H__ */ jack-rack-f9fb65d/src/plugin_slot_callbacks.c000066400000000000000000000122561151220453700213460ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #define _GNU_SOURCE #include "ac_config.h" #include #include #include #include #include #include #ifdef HAVE_GNOME #include #endif #include "jack_rack.h" #include "lock_free_fifo.h" #include "plugin_slot_callbacks.h" #include "control_message.h" #include "globals.h" #include "file.h" #include "ui.h" #include "wet_dry_controls.h" #include "midi_control.h" void slot_change_cb (GtkMenuItem * menuitem, gpointer user_data) { plugin_slot_t * plugin_slot; plugin_desc_t * desc; plugin_slot = user_data; desc = (plugin_desc_t *) g_object_get_data (G_OBJECT(menuitem), "jack-rack-plugin-desc"); plugin_slot_send_change_plugin (plugin_slot, desc); } void slot_move_cb (GtkButton * button, gpointer user_data) { plugin_slot_t * plugin_slot; gboolean up; plugin_slot = user_data; up = GPOINTER_TO_INT (g_object_get_data (G_OBJECT(button), "jack-rack-up")); jack_rack_send_move_plugin_slot (plugin_slot->jack_rack, plugin_slot, up); } void slot_remove_cb (GtkButton * button, gpointer user_data) { plugin_slot_t * plugin_slot; plugin_slot = (plugin_slot_t *) user_data; jack_rack_send_remove_plugin_slot (plugin_slot->jack_rack, plugin_slot); } gboolean slot_ablise_cb (GtkWidget * button, GdkEventButton *event, gpointer user_data) { if (event->type == GDK_BUTTON_PRESS) { switch (event->button) { case 1: { plugin_slot_t * plugin_slot; gboolean ablise; plugin_slot = (plugin_slot_t *) user_data; ablise = settings_get_enabled (plugin_slot->settings) ? FALSE : TRUE; plugin_slot_send_ablise (plugin_slot, ablise); return TRUE; } case 3: { ui_t * ui; plugin_slot_t * plugin_slot; plugin_slot = (plugin_slot_t *) user_data; ui = plugin_slot->jack_rack->ui; g_object_set_data (G_OBJECT (ui->midi_menu_item), "jack-rack-ctrl-type", GINT_TO_POINTER(2/*PLUGIN_ENABLE_CONTROL*/)); g_object_set_data (G_OBJECT (ui->midi_menu_item), "jack-rack-plugin-slot", plugin_slot); gtk_menu_popup (GTK_MENU (ui->midi_menu), NULL, NULL, NULL, NULL, event->button, event->time); return TRUE; } } } return FALSE; } gboolean slot_wet_dry_cb (GtkWidget * button, GdkEventButton *event, gpointer user_data) { if (event->type == GDK_BUTTON_PRESS) { plugin_slot_t * plugin_slot; gboolean ablise; plugin_slot = (plugin_slot_t *) user_data; ablise = settings_get_wet_dry_enabled (plugin_slot->settings) ? FALSE : TRUE; plugin_slot_send_ablise_wet_dry (plugin_slot, ablise); return TRUE; } return FALSE; } void slot_wet_dry_control_cb (GtkRange * range, gpointer user_data) { LADSPA_Data value; wet_dry_controls_t * wet_dry; unsigned long channel; wet_dry = (wet_dry_controls_t *) user_data; channel = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT(range), "jack-rack-wet-dry-channel")); value = gtk_range_get_value (range); lff_write (wet_dry->fifos + channel, &value); settings_set_wet_dry_value (wet_dry->plugin_slot->settings, channel, value); /* set peers */ if (settings_get_wet_dry_locked (wet_dry->plugin_slot->settings)) { unsigned long c; for (c = 0; c < wet_dry->plugin_slot->jack_rack->channels ; c++) if (c != channel) gtk_range_set_value (GTK_RANGE(wet_dry->controls[c]), gtk_range_get_value (range)); } } void slot_wet_dry_lock_cb (GtkToggleButton * button, gpointer user_data) { wet_dry_controls_t * wet_dry; wet_dry = (wet_dry_controls_t *) user_data; plugin_slot_set_wet_dry_locked (wet_dry->plugin_slot, gtk_toggle_button_get_active (button)); } void slot_lock_all_cb (GtkToggleButton * button, gpointer user_data) { gboolean lock_all; plugin_slot_t * plugin_slot; guint lock_copy; lock_all = gtk_toggle_button_get_active (button); plugin_slot = (plugin_slot_t *) user_data; lock_copy = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT(button), "jack-rack-lock-copy")); plugin_slot_set_lock_all (plugin_slot, lock_all, lock_copy); g_object_set_data (G_OBJECT(button), "jack-rack-lock-copy", GINT_TO_POINTER (0)); } /* EOF */ jack-rack-f9fb65d/src/plugin_slot_callbacks.h000066400000000000000000000031711151220453700213470ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_PLUGIN_SLOT_CALLBACKS_H__ #define __JR_PLUGIN_SLOT_CALLBACKS_H__ #include "ac_config.h" #include void slot_change_cb (GtkMenuItem * menuitem, gpointer user_data); void slot_move_cb (GtkButton * button, gpointer user_data); void slot_remove_cb (GtkButton * button, gpointer user_data); gboolean slot_ablise_cb (GtkWidget * button, GdkEventButton *event, gpointer user_data); void slot_lock_all_cb (GtkToggleButton * button, gpointer user_data); gboolean slot_wet_dry_cb (GtkWidget * button, GdkEventButton *event, gpointer user_data); void slot_wet_dry_lock_cb (GtkToggleButton * button, gpointer user_data); void slot_wet_dry_control_cb (GtkRange * range, gpointer user_data); #endif /* __JR_PLUGIN_SLOT_CALLBACKS_H__ */ jack-rack-f9fb65d/src/port_controls.c000066400000000000000000000432261151220453700177200ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #include #include #include #include #include #include "plugin_slot.h" #include "port_controls.h" #include "globals.h" #include "control_callbacks.h" #include "midi_control.h" #include "jack_rack.h" #include "control_message.h" #include "ui.h" #ifdef HAVE_LRDF #include #endif #define TEXT_BOX_WIDTH 75 #define TEXT_BOX_CHARS -1 /** create a control for float ports */ static GtkWidget * create_float_control (plugin_desc_t * desc, unsigned long port_index) { LADSPA_Data lower; LADSPA_Data upper; GtkWidget *widget; if (LADSPA_IS_HINT_SAMPLE_RATE (desc->port_range_hints[port_index].HintDescriptor)) { lower = desc->port_range_hints[port_index].LowerBound * (LADSPA_Data) sample_rate; upper = desc->port_range_hints[port_index].UpperBound * (LADSPA_Data) sample_rate; } else { lower = desc->port_range_hints[port_index].LowerBound; upper = desc->port_range_hints[port_index].UpperBound; } if (!LADSPA_IS_HINT_BOUNDED_BELOW (desc->port_range_hints[port_index].HintDescriptor)) { lower = (LADSPA_Data) - 100.0; } if (!LADSPA_IS_HINT_BOUNDED_ABOVE (desc->port_range_hints[port_index].HintDescriptor)) { upper = (LADSPA_Data) 100.0; } if (LADSPA_IS_HINT_LOGARITHMIC (desc->port_range_hints[port_index].HintDescriptor)) { if (lower < FLT_EPSILON) lower = FLT_EPSILON; lower = log (lower); upper = log (upper); } widget = gtk_hscale_new_with_range ((gdouble) lower, (gdouble) upper, (upper - lower) / 10.0); gtk_scale_set_draw_value (GTK_SCALE (widget), FALSE); gtk_scale_set_digits (GTK_SCALE (widget), 8); gtk_range_set_increments (GTK_RANGE (widget), (upper - lower) / 1000.0, (upper - lower) / 10.0); g_assert (widget != NULL); return widget; } /** create a control for integer ports */ static GtkWidget * create_int_control (plugin_desc_t * desc, unsigned long port_index) { int lower = 0, upper = 0; GtkWidget *widget; if (LADSPA_IS_HINT_SAMPLE_RATE (desc->port_range_hints[port_index].HintDescriptor)) { lower = desc->port_range_hints[port_index].LowerBound * (LADSPA_Data) sample_rate; upper = desc->port_range_hints[port_index].UpperBound * (LADSPA_Data) sample_rate; } else { lower = desc->port_range_hints[port_index].LowerBound; upper = desc->port_range_hints[port_index].UpperBound; } if (!LADSPA_IS_HINT_BOUNDED_BELOW (desc->port_range_hints[port_index].HintDescriptor)) { lower = -100.0; } if (!LADSPA_IS_HINT_BOUNDED_ABOVE (desc->port_range_hints[port_index].HintDescriptor)) { upper = 100.0; } if (!(lower < upper)) { if (!LADSPA_IS_HINT_BOUNDED_ABOVE (desc->port_range_hints[port_index].HintDescriptor)) { lower = upper - 100; } else { upper = lower + 100; } } widget = gtk_spin_button_new_with_range ((gdouble) lower, (gdouble) upper, 1.0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (widget), TRUE); gtk_spin_button_set_digits (GTK_SPIN_BUTTON (widget), 0); return widget; } /** create a control for points ports */ static GtkWidget * create_points_control (plugin_desc_t * desc, unsigned long port_index) { GtkWidget *widget = NULL; #ifdef HAVE_LRDF GtkListStore *store; lrdf_defaults *defs; int i; GtkCellRenderer *renderer; store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_FLOAT); defs = lrdf_get_scale_values (desc->id, port_index); for (i = 0; i < defs->count; i++) { GtkTreeIter iter; gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, defs->items[i].label, 1, defs->items[i].value, -1); } lrdf_free_setting_values (defs); widget = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); g_object_unref (store); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (widget), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (widget), renderer, "text", 0, NULL); #endif return widget; } /** creates a string for the a control port label, possibly splitting from "foo (bar=baz,foobar=foobaz)" to "foo\nbar=baz\nfoobar=foobaz" */ static const char * create_port_label (const char *port_name) { static GString *string = NULL; gchar *start; gchar *str; gchar *end; if (!string) { string = g_string_new (""); } str = g_strdup (port_name); start = strchr (str, '('); if (start) { end = strchr (start, '='); if (end) { *(start - 1) = '\0'; g_string_printf (string, "%s", str); start++; do { end = strchr (start, ','); if (!end) { end = strchr (start, ')'); if (end) { *end = '\0'; } g_string_append_printf (string, "\n%s", start); g_free (str); return string->str; } *end = '\0'; g_string_append_printf (string, "\n%s", start); end++; while (*end == ' ') end++; start = end; } while (1); } } g_string_printf (string, "%s", port_name); g_free (str); return string->str; } static void plugin_slot_create_control_table_row (plugin_slot_t * plugin_slot, port_controls_t * port_controls) { guint i, copies; plugin_desc_t * desc; const LADSPA_Descriptor * descriptor; GtkWidget * label; GtkWidget * control_box; desc = plugin_slot->plugin->desc; descriptor = plugin_slot->plugin->descriptor; copies = plugin_slot->plugin->copies; if (copies > 1) { /* lock control */ port_controls->lock = gtk_toggle_button_new_with_label (_("Lock")); g_signal_connect (G_OBJECT (port_controls->lock), "toggled", G_CALLBACK (control_lock_cb), port_controls); gtk_table_attach (GTK_TABLE (plugin_slot->control_table), port_controls->lock, 2, 3, port_controls->control_index, port_controls->control_index + 1, GTK_FILL, GTK_FILL, 0, 0); } /* label */ label = gtk_label_new (create_port_label (descriptor->PortNames[port_controls->port_index])); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (plugin_slot->control_table), label, 0, 1, port_controls->control_index, port_controls->control_index + 1, GTK_FILL, GTK_FILL, 3, 0); /* control box */ control_box = gtk_hbox_new (FALSE, 0); gtk_widget_show (control_box); gtk_table_attach (GTK_TABLE (plugin_slot->control_table), control_box, 1, 2, port_controls->control_index, port_controls->control_index + 1, GTK_EXPAND|GTK_FILL, GTK_EXPAND|GTK_FILL, 0, 0); for (i = 0; i < copies; i++) { /* control fifo */ port_controls->controls[i].control_fifo = plugin_slot->plugin->holders[i].ui_control_fifos + port_controls->control_index; /* create the control(s) */ switch (port_controls->type) { case JR_CTRL_FLOAT: port_controls->controls[i].control = create_float_control (desc, port_controls->port_index); g_signal_connect (G_OBJECT (port_controls->controls[i].control), "value-changed", G_CALLBACK (control_float_cb), port_controls); port_controls->controls[i].text = gtk_entry_new (); gtk_entry_set_max_length (GTK_ENTRY (port_controls->controls[i].text), TEXT_BOX_CHARS); gtk_widget_set_size_request (port_controls->controls[i]. text, TEXT_BOX_WIDTH, -1); gtk_widget_show (port_controls->controls[i].text); g_object_set_data (G_OBJECT (port_controls->controls[i].text), "jack-rack-plugin-copy", GINT_TO_POINTER (i)); g_signal_connect (G_OBJECT (port_controls->controls[i].text), "activate", G_CALLBACK (control_float_text_cb), port_controls); break; case JR_CTRL_INT: port_controls->controls[i].control = create_int_control (desc, port_controls->port_index); g_signal_connect (G_OBJECT (port_controls->controls[i].control), "value-changed", G_CALLBACK (control_int_cb), port_controls); port_controls->controls[i].text = NULL; break; case JR_CTRL_POINTS: port_controls->controls[i].control = create_points_control (desc, port_controls->port_index); g_signal_connect (G_OBJECT (port_controls->controls[i].control), "changed", G_CALLBACK (control_points_cb), port_controls); port_controls->controls[i].text = NULL; break; case JR_CTRL_BOOL: port_controls->controls[i].control = gtk_toggle_button_new_with_label (_("On")); g_signal_connect (G_OBJECT (port_controls->controls[i].control), "toggled", G_CALLBACK (control_bool_cb), port_controls); port_controls->controls[i].text = NULL; break; } gtk_widget_show (port_controls->controls[i].control); g_object_set_data (G_OBJECT (port_controls->controls[i].control), "jack-rack-plugin-copy", GUINT_TO_POINTER (i)); g_signal_connect (G_OBJECT (port_controls->controls[i].control), "button-press-event", G_CALLBACK (control_button_press_cb), port_controls); gtk_box_pack_start (GTK_BOX (control_box), port_controls->controls[i].control, TRUE, TRUE, 0); if (port_controls->type == JR_CTRL_FLOAT) gtk_box_pack_start (GTK_BOX (control_box), port_controls->controls[i].text, FALSE, TRUE, 0); } } port_controls_t * port_controls_new (plugin_slot_t * plugin_slot) { plugin_desc_t *desc; unsigned long i; port_controls_t *port_controls_array; port_controls_t *port_controls; desc = plugin_slot->plugin->desc; /* make the controls array */ port_controls_array = g_malloc (sizeof (port_controls_t) * desc->control_port_count); /* contruct the control rows */ for (i = 0; i < desc->control_port_count; i++) { port_controls = port_controls_array + i; port_controls->lock = NULL; port_controls->locked = TRUE; port_controls->lock_copy = 0; port_controls->plugin_slot = plugin_slot; port_controls->control_index = i; port_controls->port_index = desc->control_port_indicies[i]; /* get the port control type from the hints */ #ifdef HAVE_LRDF if (lrdf_get_scale_values(desc->id, port_controls->port_index) != NULL) port_controls->type = JR_CTRL_POINTS; else #endif if (LADSPA_IS_HINT_TOGGLED (desc->port_range_hints[port_controls->port_index].HintDescriptor)) port_controls->type = JR_CTRL_BOOL; else if (LADSPA_IS_HINT_INTEGER (desc->port_range_hints[port_controls->port_index].HintDescriptor)) port_controls->type = JR_CTRL_INT; else port_controls->type = JR_CTRL_FLOAT; if (LADSPA_IS_HINT_LOGARITHMIC (desc->port_range_hints[port_controls->port_index].HintDescriptor)) port_controls->logarithmic = TRUE; else port_controls->logarithmic = FALSE; port_controls->controls = g_malloc (sizeof (controls_t) * plugin_slot->plugin->copies); plugin_slot_create_control_table_row (plugin_slot, port_controls); } return port_controls_array; } void port_control_set_locked (port_controls_t *port_controls, gboolean locked) { GSList *list; plugin_slot_t *plugin_slot; #ifdef HAVE_ALSA midi_control_t *midi_ctrl; #endif plugin_slot = port_controls->plugin_slot; port_controls->locked = locked; settings_set_lock (plugin_slot->settings, port_controls->control_index, locked); #ifdef HAVE_ALSA for (list = plugin_slot->midi_controls; list; list = g_slist_next (list)) { midi_ctrl = (midi_control_t *) list->data; if (midi_ctrl->ctrl_type == LADSPA_CONTROL && midi_ctrl->control.ladspa.control == port_controls->control_index) midi_control_set_locked (midi_ctrl, locked); } #endif plugin_slot_show_controls (port_controls->plugin_slot, port_controls->lock_copy); } void gtk_widget_block_signal(GtkWidget *widget, const char *signal, GCallback callback) { g_signal_handlers_block_matched ( widget, G_SIGNAL_MATCH_FUNC, g_signal_lookup (signal, G_TYPE_FROM_INSTANCE (widget)), 0, NULL, callback, NULL); } void port_controls_block_float_callback (port_controls_t *port_controls, guint copy) { gtk_widget_block_signal(port_controls->controls[copy].control, "value-changed", G_CALLBACK (control_float_cb)); } void port_controls_block_int_callback (port_controls_t * port_controls, guint copy) { gtk_widget_block_signal(port_controls->controls[copy].control, "value-changed", G_CALLBACK (control_int_cb)); } void port_controls_block_points_callback (port_controls_t * port_controls, guint copy) { gtk_widget_block_signal(port_controls->controls[copy].control, "changed", G_CALLBACK (control_points_cb)); } void port_controls_block_bool_callback (port_controls_t * port_controls, guint copy) { gtk_widget_block_signal(port_controls->controls[copy].control, "toggled", G_CALLBACK (control_bool_cb)); } void gtk_widget_unblock_signal (GtkWidget *widget, const char *signal, GCallback callback) { g_signal_handlers_unblock_matched ( widget, G_SIGNAL_MATCH_FUNC, g_signal_lookup (signal, G_TYPE_FROM_INSTANCE (widget)), 0, NULL, callback, NULL); } void port_controls_unblock_float_callback (port_controls_t *port_controls, guint copy) { gtk_widget_unblock_signal (port_controls->controls[copy].control, "value-changed", G_CALLBACK (control_float_cb)); } void port_controls_unblock_int_callback (port_controls_t * port_controls, guint copy) { gtk_widget_unblock_signal (port_controls->controls[copy].control, "value-changed", G_CALLBACK (control_int_cb)); } void port_controls_unblock_points_callback (port_controls_t * port_controls, guint copy) { gtk_widget_unblock_signal (port_controls->controls[copy].control, "changed", G_CALLBACK (control_points_cb)); } void port_controls_unblock_bool_callback (port_controls_t * port_controls, guint copy) { gtk_widget_unblock_signal (port_controls->controls[copy].control, "toggled", G_CALLBACK (control_bool_cb)); } #ifdef HAVE_ALSA static void port_control_send_midi_value (port_controls_t *port_controls, guint copy, LADSPA_Data value) { midi_control_t *midi_ctrl; GSList *list; ctrlmsg_t ctrlmsg; ctrlmsg.type = CTRLMSG_MIDI_CTRL; ctrlmsg.data.midi.value = value; for (list = port_controls->plugin_slot->midi_controls; list; list = g_slist_next (list)) { midi_ctrl = list->data; if (midi_ctrl->ctrl_type == LADSPA_CONTROL && midi_ctrl->control.ladspa.control == port_controls->control_index && midi_ctrl->control.ladspa.copy == copy) { ctrlmsg.data.midi.midi_control = midi_ctrl; lff_write (port_controls->plugin_slot->jack_rack->ui->ui_to_midi, &ctrlmsg); } } } #endif /* HAVE_ALSA */ void port_control_send_value (port_controls_t *port_controls, guint copy, LADSPA_Data value) { /* write to the fifo */ lff_write (port_controls->controls[copy].control_fifo, &value); /* store the value */ settings_set_control_value (port_controls->plugin_slot->settings, copy, port_controls->control_index, value); /* send the midi controls */ #ifdef HAVE_ALSA port_control_send_midi_value (port_controls, copy, value); #endif } /* EOF */ jack-rack-f9fb65d/src/port_controls.h000066400000000000000000000056121151220453700177220ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_PORT_CONTROLS_H__ #define __JR_PORT_CONTROLS_H__ #include #include typedef struct _controls controls_t; typedef struct _port_controls port_controls_t; enum _control_type { JR_CTRL_FLOAT, JR_CTRL_INT, JR_CTRL_POINTS, JR_CTRL_BOOL }; typedef enum _control_type control_type_t; struct _controls { GtkWidget *control; GtkWidget *text; lff_t *control_fifo; }; /** the widgets for controlling an ladspa control port. this is what is passed to the callbacks for the widgets, allowing them to send data down the fifo, and update the values in the different widgets */ struct _port_controls { control_type_t type; gboolean logarithmic; controls_t * controls; /* single copy only stuff */ GtkWidget * lock; gboolean locked; gint lock_copy; struct _plugin_slot * plugin_slot; unsigned long port_index; unsigned long control_index; }; port_controls_t * port_controls_new (struct _plugin_slot * plugin_slot); void port_control_set_locked (port_controls_t *port_controls, gboolean locked); void port_control_send_value (port_controls_t *port_controls, guint copy, LADSPA_Data value); void gtk_widget_block_signal(GtkWidget *widget, const char *signal, GCallback callback); void gtk_widget_unblock_signal(GtkWidget *widget, const char *signal, GCallback callback); void port_controls_block_float_callback (port_controls_t * port_controls, guint copy); void port_controls_block_int_callback (port_controls_t * port_controls, guint copy); void port_controls_block_points_callback (port_controls_t * port_controls, guint copy); void port_controls_block_bool_callback (port_controls_t * port_controls, guint copy); void port_controls_unblock_float_callback (port_controls_t * port_controls, guint copy); void port_controls_unblock_int_callback (port_controls_t * port_controls, guint copy); void port_controls_unblock_points_callback (port_controls_t * port_controls, guint copy); void port_controls_unblock_bool_callback (port_controls_t * port_controls, guint copy); #endif /* __JR_PORT_CONTROLS_H__ */ jack-rack-f9fb65d/src/process.c000066400000000000000000000472361151220453700164740ustar00rootroot00000000000000/* * jack-ladspa-host * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #include #if HAVE_JACK_SESSION #include #endif #include #include #include #include #include #include #include #include #include "process.h" #include "control_message.h" #include "lock_free_fifo.h" #include "plugin.h" #include "globals.h" #include "jack_rack.h" #include "ui.h" #include "ui_callbacks.h" #include "util.h" #define USEC_PER_SEC 1000000 #define MSEC_PER_SEC 1000 #define TIME_RUN_SKIP_COUNT 5 extern void default_status_handler (void*, const char*, ...); extern void default_error_handler (void*, error_severity_t, const char*, ...); jack_nframes_t sample_rate; jack_nframes_t buffer_size; static char * jack_client_name; static status_callback _update_status = default_status_handler; static error_callback _display_error = default_error_handler; static void* _status_cb_data = NULL; static void* _error_cb_data = NULL; /** * Set the function to call when status changes * * @param data The data to pass to the function */ void process_set_status_cb ( void* data, status_callback cb ) { _update_status = cb; _status_cb_data = data; } /** * Set the function to call when an error occurs * * @see process_set_status_cb */ void process_set_error_cb ( void* data, error_callback cb ) { _display_error = cb; _error_cb_data = data; } int process_control_messages (process_info_t * procinfo) { static int quitting = 0; ctrlmsg_t ctrlmsg; int err = 0; if (quitting) return quitting; while (lff_read (procinfo->ui_to_process, &ctrlmsg) == 0) { switch (ctrlmsg.type) { /* add a link to the end of the plugin chain */ case CTRLMSG_ADD: process_add_plugin (procinfo, ctrlmsg.data.add.plugin); err = lff_write (procinfo->process_to_ui, &ctrlmsg); break; /* remove a link (plugin will be sent back) */ case CTRLMSG_REMOVE: ctrlmsg.data.remove.plugin = process_remove_plugin (procinfo, ctrlmsg.data.remove.plugin); err = lff_write (procinfo->process_to_ui, &ctrlmsg); break; /* enable/disable a plugin */ case CTRLMSG_ABLE: process_ablise_plugin (procinfo, ctrlmsg.data.ablise.plugin, ctrlmsg.data.ablise.enable); err = lff_write (procinfo->process_to_ui, &ctrlmsg); break; /* enable/disable wet/dry controls */ case CTRLMSG_ABLE_WET_DRY: process_ablise_plugin_wet_dry (procinfo, ctrlmsg.data.ablise.plugin, ctrlmsg.data.ablise.enable); err = lff_write (procinfo->process_to_ui, &ctrlmsg); break; /* move a plugin up or down */ case CTRLMSG_MOVE: process_move_plugin (procinfo, ctrlmsg.data.move.plugin, ctrlmsg.data.move.up); err = lff_write (procinfo->process_to_ui, &ctrlmsg); break; /* change an existing plugin for a new one (existing plugin will be sent back) */ case CTRLMSG_CHANGE: ctrlmsg.data.change.old_plugin = process_change_plugin (procinfo, ctrlmsg.data.change.old_plugin, ctrlmsg.data.change.new_plugin); err = lff_write (procinfo->process_to_ui, &ctrlmsg); break; /* remove all the plugins and send them back */ /* case CTRLMSG_CLEAR: ctrlmsg.data.clear.chain = procinfo->chain; procinfo->chain = NULL; procinfo->chain_end = NULL; err = lff_write (procinfo->process_to_ui, &ctrlmsg); break; */ case CTRLMSG_QUIT: quitting = 1; err = lff_write (procinfo->process_to_ui, &ctrlmsg); return 1; default: break; } if (err) { _display_error ( _error_cb_data, E_ERROR, _("%s: GUI FIFO is out of space\n"), __FUNCTION__ ); return err; } } return 0; } /** process messages for plugins' control ports */ void process_control_port_messages (process_info_t * procinfo) { plugin_t * plugin; unsigned long control; unsigned long channel; gint copy; if (!procinfo->chain) return; for (plugin = procinfo->chain; plugin; plugin = plugin->next) { if (plugin->desc->control_port_count > 0) for (control = 0; control < plugin->desc->control_port_count; control++) for (copy = 0; copy < plugin->copies; copy++) { while (lff_read (plugin->holders[copy].ui_control_fifos + control, plugin->holders[copy].control_memory + control) == 0); #ifdef HAVE_ALSA while (lff_read (plugin->holders[copy].midi_control_fifos + control, plugin->holders[copy].control_memory + control) == 0); #endif } if (plugin->wet_dry_enabled) for (channel = 0; channel < procinfo->channels; channel++) { while (lff_read (plugin->wet_dry_fifos + channel, plugin->wet_dry_values + channel) == 0); #ifdef HAVE_ALSA while (lff_read (plugin->wet_dry_midi_fifos + channel, plugin->wet_dry_values + channel) == 0); #endif } } } int get_jack_buffers (process_info_t * procinfo, jack_nframes_t frames) { unsigned long channel; for (channel = 0; channel < procinfo->channels; channel++) { procinfo->jack_input_buffers[channel] = jack_port_get_buffer (procinfo->jack_input_ports[channel], frames); if (!procinfo->jack_input_buffers[channel]) { fprintf (stderr, _("%s: no JACK buffer for input port %ld\n"), __FUNCTION__, channel); return 1; } procinfo->jack_output_buffers[channel] = jack_port_get_buffer (procinfo->jack_output_ports[channel], frames); if (!procinfo->jack_output_buffers[channel]) { fprintf (stderr, _("%s: no JACK buffer for output port %ld\n"), __FUNCTION__, channel); return 1; } } return 0; } plugin_t * get_first_enabled_plugin (process_info_t * procinfo) { plugin_t * first_enabled; if (!procinfo->chain) return NULL; for (first_enabled = procinfo->chain; first_enabled; first_enabled = first_enabled->next) { if (first_enabled->enabled) return first_enabled; } return NULL; } plugin_t * get_last_enabled_plugin (process_info_t * procinfo) { plugin_t * last_enabled; if (!procinfo->chain) return NULL; for (last_enabled = procinfo->chain_end; last_enabled; last_enabled = last_enabled->prev) { if (last_enabled->enabled) return last_enabled; } return NULL; } void connect_chain (process_info_t * procinfo, jack_nframes_t frames) { plugin_t * first_enabled, * last_enabled, * plugin; gint copy; unsigned long channel; if (!procinfo->chain) return; first_enabled = get_first_enabled_plugin (procinfo); if (!first_enabled) return; last_enabled = get_last_enabled_plugin (procinfo); /* sort out the aux ports */ plugin = first_enabled; do { if (plugin->desc->aux_channels > 0) { if (plugin->enabled) for (copy = 0; copy < plugin->copies; copy++) for (channel = 0; channel < plugin->desc->aux_channels; channel++) plugin->descriptor-> connect_port (plugin->holders[copy].instance, plugin->desc->audio_aux_port_indicies[channel], jack_port_get_buffer (plugin->holders[copy].aux_ports[channel], frames)); } } while ( (plugin != last_enabled) && (plugin = plugin->next) ); /* ensure that all the of the enabled plugins are connected to their memory */ plugin_connect_output_ports (first_enabled); if (first_enabled != last_enabled) { plugin_connect_input_ports (last_enabled, last_enabled->prev->audio_output_memory); for (plugin = first_enabled->next; plugin; plugin = plugin->next) { if (plugin->enabled) { plugin_connect_input_ports (plugin, plugin->prev->audio_output_memory); plugin_connect_output_ports (plugin); } } } /* input buffers for first plugin */ plugin_connect_input_ports (first_enabled, procinfo->jack_input_buffers); } void process_chain (process_info_t * procinfo, jack_nframes_t frames) { LADSPA_Data zero_signal[frames]; plugin_t * first_enabled; plugin_t * last_enabled = NULL; plugin_t * plugin; unsigned long channel; unsigned long i; guint copy; /* set the zero signal to zero */ for (channel = 0; channel < frames; channel++) zero_signal[channel] = 0.0; /* possibly set aux output channels to zero if they're not enabled */ for (plugin = procinfo->chain; plugin; plugin = plugin->next) if (!plugin->enabled && plugin->desc->aux_channels > 0 && !plugin->desc->aux_are_input) for (copy = 0; copy < plugin->copies; copy++) for (channel = 0; channel < plugin->desc->aux_channels; channel++) memcpy (jack_port_get_buffer (plugin->holders[copy].aux_ports[channel], frames), zero_signal, sizeof (LADSPA_Data) * frames); first_enabled = get_first_enabled_plugin (procinfo); /* no chain; just copy input to output */ if (!procinfo->chain || !first_enabled) { unsigned long channel; for (channel = 0; channel < procinfo->channels; channel++) { memcpy (procinfo->jack_output_buffers[channel], procinfo->jack_input_buffers[channel], sizeof(LADSPA_Data) * frames); } return; } /* all past here is guaranteed to have at least 1 enabled plugin */ last_enabled = get_last_enabled_plugin (procinfo); for (plugin = first_enabled; plugin; plugin = plugin->next) { if (plugin->enabled) { for (i = 0; i < plugin->copies; i++) plugin->descriptor->run (plugin->holders[i].instance, frames); if (plugin->wet_dry_enabled) for (channel = 0; channel < procinfo->channels; channel++) for (i = 0; i < frames; i++) { plugin->audio_output_memory[channel][i] *= plugin->wet_dry_values[channel]; plugin->audio_output_memory[channel][i] += plugin->audio_input_memory[channel][i] * (1.0 - plugin->wet_dry_values[channel]); } if (plugin == last_enabled) break; } else { /* copy the data through */ for (i = 0; i < procinfo->channels; i++) memcpy (plugin->audio_output_memory[i], plugin->prev->audio_output_memory[i], sizeof(LADSPA_Data) * frames); } } /* copy the last enabled data to the jack ports */ for (i = 0; i < procinfo->channels; i++) memcpy (procinfo->jack_output_buffers[i], last_enabled->audio_output_memory[i], sizeof(LADSPA_Data) * frames); } int process (jack_nframes_t frames, void * data) { int err, quitting; process_info_t * procinfo; procinfo = (process_info_t *) data; if (!procinfo) { _display_error ( _error_cb_data, E_WARNING, _("%s: no process_info from JACK!\n"), __FUNCTION__ ); return 1; } quitting = process_control_messages (procinfo); if (quitting) return 1; process_control_port_messages (procinfo); err = get_jack_buffers (procinfo, frames); if (err) { _display_error ( _error_cb_data, E_WARNING, _("%s: failed to get JACK ports, not processing\n"), __FUNCTION__ ); return 0; } connect_chain (procinfo, frames); process_chain (procinfo, frames); return 0; } /**** * Non-RT stuff starts here ****/ static int process_info_connect_jack (process_info_t * procinfo, ui_t * ui) { _update_status ( _("Connecting to JACK server with client name '%s'"), jack_client_name ); #if HAVE_JACK_SESSION if (strlen (session_uuid->str)) procinfo->jack_client = jack_client_open (jack_client_name, JackSessionID, NULL, session_uuid->str); else #endif procinfo->jack_client = jack_client_open (jack_client_name, JackNullOption, NULL); if (!procinfo->jack_client) return -1; _update_status ( _status_cb_data, _("Connected to JACK server") ); jack_set_process_callback (procinfo->jack_client, process, procinfo); jack_on_shutdown (procinfo->jack_client, jack_shutdown_cb, ui); /* FIXME: need a generic callback for this, too */ #if HAVE_JACK_SESSION if( jack_set_session_callback ) jack_set_session_callback (procinfo->jack_client, jack_session_cb_aux, ui); #endif return 0; } static void process_info_connect_port (process_info_t * procinfo, ui_t * ui, gshort in, unsigned long port_index, const char * port_name) { const char ** jack_ports; unsigned long jack_port_index; int err; char * full_port_name; jack_ports = jack_get_ports (procinfo->jack_client, NULL, NULL, JackPortIsPhysical | (in ? JackPortIsOutput : JackPortIsInput)); if (!jack_ports) return; for (jack_port_index = 0; jack_ports[jack_port_index] && jack_port_index <= port_index; jack_port_index++) { if (jack_port_index != port_index) continue; full_port_name = g_strdup_printf ("%s:%s", jack_client_name, port_name); _update_status ( _("Connecting port '%s' with '%s'"), full_port_name, jack_ports[jack_port_index] ); err = jack_connect (procinfo->jack_client, in ? jack_ports[jack_port_index] : full_port_name, in ? full_port_name : jack_ports[jack_port_index]); if (err) fprintf (stderr, _("%s: error connecting ports '%s' and '%s'\n"), __FUNCTION__, full_port_name, jack_ports[jack_port_index]); else _update_status ( _("Connected port '%s' with '%s'"), full_port_name, jack_ports[jack_port_index] ); free (full_port_name); } free (jack_ports); } int process_info_set_port_count (process_info_t * procinfo, ui_t * ui, unsigned long port_count) { unsigned long i; char * port_name; jack_port_t ** port_ptr; gshort in; if (procinfo->port_count >= port_count) return 0; if (procinfo->port_count == 0) { procinfo->jack_input_ports = g_malloc (sizeof (jack_port_t *) * port_count); procinfo->jack_output_ports = g_malloc (sizeof (jack_port_t *) * port_count); procinfo->jack_input_buffers = g_malloc (sizeof (LADSPA_Data *) * port_count); procinfo->jack_output_buffers = g_malloc (sizeof (LADSPA_Data *) * port_count); } else { procinfo->jack_input_ports = g_realloc (procinfo->jack_input_ports, sizeof (jack_port_t *) * port_count); procinfo->jack_output_ports = g_realloc (procinfo->jack_output_ports, sizeof (jack_port_t *) * port_count); procinfo->jack_input_buffers = g_realloc (procinfo->jack_input_buffers, sizeof (LADSPA_Data *) * port_count); procinfo->jack_output_buffers = g_realloc (procinfo->jack_output_buffers, sizeof (LADSPA_Data *) * port_count); } for (i = procinfo->port_count; i < port_count; i++) { for (in = 0; in < 2; in++) { port_name = g_strdup_printf ("%s_%ld", in ? "in" : "out", i + 1); if (in) { _update_status (_status_cb_data, _("Creating input port '%s'"), port_name); } else { _update_status (_status_cb_data, _("Creating output port '%s'"), port_name); } port_ptr = (in ? &procinfo->jack_input_ports[i] : &procinfo->jack_output_ports[i]); *port_ptr = jack_port_register (procinfo->jack_client, port_name, JACK_DEFAULT_AUDIO_TYPE, in ? JackPortIsInput : JackPortIsOutput, 0); if (!*port_ptr) { fprintf (stderr, _("%s: could not register port '%s'; aborting\n"), __FUNCTION__, port_name); ui_display_error ( _error_cb_data, E_FATAL, _("Could not register JACK port '%s'; aborting"), port_name); return 1; } if ((in && connect_inputs) || (!in && connect_outputs)) process_info_connect_port (procinfo, ui, in, i, port_name); g_free (port_name); } } procinfo->port_count = port_count; return 0; } void process_info_set_channels (process_info_t * procinfo, ui_t * ui, unsigned long channels) { process_info_set_port_count (procinfo, ui, channels); procinfo->channels = channels; } process_info_t * process_info_new (ui_t* ui, unsigned long rack_channels) { process_info_t* procinfo; int err; procinfo = g_malloc (sizeof (process_info_t)); procinfo->chain = NULL; procinfo->chain_end = NULL; procinfo->jack_client = NULL; procinfo->port_count = 0; procinfo->jack_input_ports = NULL; procinfo->jack_output_ports = NULL; procinfo->channels = rack_channels; procinfo->time_runs = time_runs; /* sort out the client name */ jack_client_name = g_strdup ( client_name->str ); sanitize_client_name ( jack_client_name ); err = process_info_connect_jack (procinfo, ui); if (err == -1) { g_free (jack_client_name); g_free (procinfo); return NULL; } err = process_info_set_port_count (procinfo, ui, rack_channels); if (err) return NULL; sample_rate = jack_get_sample_rate (procinfo->jack_client); buffer_size = jack_get_sample_rate (procinfo->jack_client); jack_set_process_callback (procinfo->jack_client, process, procinfo); jack_on_shutdown (procinfo->jack_client, jack_shutdown_cb, ui); #if HAVE_JACK_SESSION if( jack_set_session_callback ) jack_set_session_callback (procinfo->jack_client, jack_session_cb_aux, ui); #endif procinfo->ui_to_process = ui->ui_to_process; procinfo->process_to_ui = ui->process_to_ui; jack_activate (procinfo->jack_client); #ifdef HAVE_LASH /* sort out LASH stuff */ lash_jack_client_name (global_lash_client, jack_client_name); #endif return procinfo; } void process_info_destroy (process_info_t * procinfo) { jack_deactivate (procinfo->jack_client); jack_client_close (procinfo->jack_client); g_free (procinfo); } jack-rack-f9fb65d/src/process.h000066400000000000000000000037531151220453700164750ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JLH_PROCESS_H__ #define __JLH_PROCESS_H__ #include #include #include #include "types.h" #include "lock_free_fifo.h" #include "globals.h" typedef struct _process_info process_info_t; /** this is what gets passed to the process() callback and contains all the data the process callback will need */ struct _process_info { /** the plugin instance chain */ struct _plugin * chain; struct _plugin * chain_end; jack_client_t * jack_client; unsigned long port_count; jack_port_t ** jack_input_ports; jack_port_t ** jack_output_ports; unsigned long channels; LADSPA_Data ** jack_input_buffers; LADSPA_Data ** jack_output_buffers; lff_t * ui_to_process; lff_t * process_to_ui; gboolean time_runs; }; extern jack_nframes_t sample_rate; extern jack_nframes_t buffer_size; struct _ui; process_info_t * process_info_new (struct _ui * ui, unsigned long rack_channels); void process_info_destroy (process_info_t * procinfo); void process_info_set_channels (process_info_t * procinfo, struct _ui * ui, unsigned long channels); int process (jack_nframes_t frames, void * data); #endif /* __JLH_PROCESS_H__ */ jack-rack-f9fb65d/src/types.h000066400000000000000000000004461151220453700161570ustar00rootroot00000000000000#ifndef TYPES_H_INCLUDED #define TYPES_H_INCLUDED typedef enum { E_NOTICE, E_WARNING, E_ERROR, E_FATAL, E_BUG } error_severity_t; typedef void (*status_callback)(void* data, const char*, ...); typedef void (*error_callback)(void* data, const error_severity_t, const char*, ...); #endif jack-rack-f9fb65d/src/ui.c000066400000000000000000000500751151220453700154260ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #include "ac_config.h" #include #include #include #include #include #include #include #include #include #include "ui.h" #include "control_message.h" #include "ui_callbacks.h" #include "control_callbacks.h" #include "globals.h" #define PROCESS_FIFO_SIZE 64 #define MIDI_FIFO_SIZE 256 static void ui_init_gui_menu (ui_t * ui, GtkWidget * main_box) { GtkWidget *menubar_handle; GtkWidget *menubar; GtkWidget *file_menuitem; GtkWidget *file_menu; #ifdef HAVE_XML GtkWidget *save; GtkWidget *save_as; #endif /* HAVE_XML */ GtkWidget *separator; GtkWidget *quit; GtkWidget *rack_menuitem; GtkWidget *rack_menu; #ifdef HAVE_GNOME GtkWidget *help_menuitem; GtkWidget *help_menu; GtkWidget *about; #endif /* the menu bar */ menubar_handle = gtk_handle_box_new (); gtk_widget_show (menubar_handle); gtk_box_pack_start (GTK_BOX (main_box), menubar_handle, FALSE, TRUE, 0); menubar = gtk_menu_bar_new (); gtk_widget_show (menubar); gtk_container_add (GTK_CONTAINER (menubar_handle), menubar); file_menuitem = gtk_menu_item_new_with_label (_("File")); gtk_widget_show (file_menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (menubar), file_menuitem); rack_menuitem = gtk_menu_item_new_with_label (_("Rack")); gtk_widget_show (rack_menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (menubar), rack_menuitem); #ifdef HAVE_GNOME help_menuitem = gtk_menu_item_new_with_label (_("Help")); gtk_widget_show (help_menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (menubar), help_menuitem); #endif /* file menu */ file_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (file_menuitem), file_menu); ui->new_menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_NEW, NULL); gtk_widget_show (ui->new_menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (file_menu), ui->new_menuitem); g_signal_connect (G_OBJECT (ui->new_menuitem), "activate", G_CALLBACK (new_cb), ui); #ifdef HAVE_XML ui->open_menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_OPEN, NULL); gtk_widget_show (ui->open_menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (file_menu), ui->open_menuitem); g_signal_connect (G_OBJECT (ui->open_menuitem), "activate", G_CALLBACK (open_cb), ui); save = gtk_image_menu_item_new_from_stock (GTK_STOCK_SAVE, NULL); gtk_widget_show (save); gtk_menu_shell_append (GTK_MENU_SHELL (file_menu), save); g_signal_connect (G_OBJECT (save), "activate", G_CALLBACK (save_cb), ui); save_as = gtk_image_menu_item_new_from_stock (GTK_STOCK_SAVE_AS, NULL); gtk_widget_show (save_as); gtk_menu_shell_append (GTK_MENU_SHELL (file_menu), save_as); g_signal_connect (G_OBJECT (save_as), "activate", G_CALLBACK (save_as_cb), ui); #endif /* HAVE_XML */ #ifdef HAVE_LASH if (lash_enabled (global_lash_client)) { separator = gtk_separator_menu_item_new (); gtk_widget_show (separator); gtk_menu_shell_append (GTK_MENU_SHELL (file_menu), separator); ui->lash_save_menu_item = gtk_menu_item_new_with_label (_("Save project")); gtk_widget_show (ui->lash_save_menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (file_menu), ui->lash_save_menu_item); g_signal_connect (G_OBJECT (ui->lash_save_menu_item), "activate", G_CALLBACK (lash_save_cb), ui); } #endif /* HAVE_LASH */ separator = gtk_separator_menu_item_new (); gtk_widget_show (separator); gtk_menu_shell_append (GTK_MENU_SHELL (file_menu), separator); quit = gtk_image_menu_item_new_from_stock (GTK_STOCK_QUIT, NULL); gtk_widget_show (quit); gtk_menu_shell_append (GTK_MENU_SHELL (file_menu), quit); g_signal_connect (G_OBJECT (quit), "activate", G_CALLBACK (quit_cb), ui); /* rack menu */ rack_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (rack_menuitem), rack_menu); ui->add_menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_ADD, NULL); gtk_widget_show (ui->add_menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (rack_menu), ui->add_menuitem); ui->add_menu = plugin_mgr_get_menu (ui->plugin_mgr, G_CALLBACK (add_cb), ui); gtk_menu_item_set_submenu (GTK_MENU_ITEM(ui->add_menuitem), ui->add_menu); ui->channels_menuitem = gtk_menu_item_new_with_label (_("Channels")); gtk_widget_show (ui->channels_menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (rack_menu), ui->channels_menuitem); g_signal_connect (G_OBJECT (ui->channels_menuitem), "activate", G_CALLBACK (channel_cb), ui); #ifdef HAVE_ALSA ui->midi_menuitem = gtk_menu_item_new_with_label (_("MIDI Controls")); gtk_widget_show (ui->midi_menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (rack_menu), ui->midi_menuitem); g_signal_connect (G_OBJECT (ui->midi_menuitem), "activate", G_CALLBACK (midi_cb), ui); #endif /* HAVE_ALSA */ #ifdef HAVE_GNOME /* help menu */ help_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM(help_menuitem), help_menu); about = gtk_menu_item_new_with_label (_("About")); gtk_widget_show (about); gtk_menu_shell_append (GTK_MENU_SHELL (help_menu), about); g_signal_connect (G_OBJECT (about), "activate", G_CALLBACK (about_cb), ui); #endif } static void ui_set_default_window_icon (void) { const char * icon_file = PIXMAPDIR "/" JACK_RACK_ICON_FILE; GError * icon_error = NULL; GList * icons = NULL; GdkPixbuf * icon; /* set the icons */ icon = gdk_pixbuf_new_from_file (icon_file, &icon_error); if (icon_error) { fprintf (stderr, "%s: error loading icon image from file '%s': '%s'\n", __FUNCTION__, icon_file, icon_error->message); g_error_free (icon_error); } icons = g_list_append (icons, icon); gtk_window_set_default_icon_list (icons); g_list_free (icons); g_object_unref (icon); } static void ui_init_gui (ui_t * ui, unsigned long channels) { GtkWidget *main_box; GtkWidget *toolbar_handle; GtkWidget *toolbar; GtkWidget *plugin_scroll; GtkWidget *plugin_viewport; GtkWidget *channel_icon; gchar *channel_icon_file; GtkToolItem *tool_item; /* main window */ ui->main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (ui->main_window), client_name->str); gtk_window_set_default_size (GTK_WINDOW (ui->main_window), 620, 460); g_signal_connect (G_OBJECT (ui->main_window), "delete_event", G_CALLBACK (window_destroy_cb), ui); /* button/viewport box */ main_box = gtk_vbox_new (FALSE, 0); gtk_widget_show (main_box); gtk_container_add (GTK_CONTAINER (ui->main_window), main_box); ui_init_gui_menu (ui, main_box); /* top button box and buttons */ toolbar_handle = gtk_handle_box_new (); gtk_widget_show (toolbar_handle); gtk_box_pack_start (GTK_BOX (main_box), toolbar_handle, FALSE, FALSE, 0); toolbar = gtk_toolbar_new (); gtk_container_add (GTK_CONTAINER (toolbar_handle), toolbar); ui->add = gtk_menu_tool_button_new_from_stock (GTK_STOCK_ADD); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), ui->add, -1); gtk_tool_item_set_tooltip_text (ui->add, _("Add a plugin")); ui->toolbar_add_menu = plugin_mgr_get_menu (ui->plugin_mgr, G_CALLBACK (add_cb), ui); gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (ui->add), ui->toolbar_add_menu); g_signal_connect (G_OBJECT (ui->add), "clicked", G_CALLBACK (plugin_add_button_cb), ui->add_menu); /* channels */ channel_icon_file = g_strdup_printf ("%s/%s", PKGDATADIR, JACK_RACK_CHANNELS_ICON_FILE); channel_icon = gtk_image_new_from_file (channel_icon_file); g_free (channel_icon_file); ui->channels = gtk_tool_button_new (channel_icon, _("Channels")); gtk_tool_item_set_tooltip_text (ui->channels, _("Change the number of I/O channels the rack has")); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), ui->channels, -1); g_signal_connect (G_OBJECT (ui->channels), "clicked", G_CALLBACK (channel_cb), ui); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), gtk_separator_tool_item_new (), -1); ui->new = gtk_tool_button_new_from_stock (GTK_STOCK_NEW); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), ui->new, -1); gtk_tool_item_set_tooltip_text (ui->new, _("Clear the rack")); g_signal_connect (G_OBJECT (ui->new), "clicked", G_CALLBACK (new_cb), ui); #ifdef HAVE_XML tool_item = gtk_tool_button_new_from_stock (GTK_STOCK_OPEN); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), tool_item, -1); gtk_tool_item_set_tooltip_text (tool_item, _("Load a previously-saved rack configuration")); g_signal_connect (G_OBJECT (tool_item), "clicked", G_CALLBACK (open_cb), ui); tool_item = gtk_tool_button_new_from_stock (GTK_STOCK_SAVE); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), tool_item, -1); gtk_tool_item_set_tooltip_text (tool_item, _("Save the rack configuration to the current file")); g_signal_connect (G_OBJECT (tool_item), "clicked", G_CALLBACK (save_cb), ui); tool_item = gtk_tool_button_new_from_stock (GTK_STOCK_SAVE_AS); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), tool_item, -1); gtk_tool_item_set_tooltip_text (tool_item, _("Save the rack configuration to a new file")); g_signal_connect (G_OBJECT (tool_item), "clicked", G_CALLBACK (save_as_cb), ui); #endif /* HAVE_XML */ #ifdef HAVE_LASH if (lash_enabled (global_lash_client)) { gtk_toolbar_insert (GTK_TOOLBAR (toolbar), gtk_separator_tool_item_new (), -1); ui->lash_save = gtk_tool_button_new_from_stock (GTK_STOCK_SAVE); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), ui->lash_save, -1); gtk_tool_item_set_tooltip_text (ui->lash_save, _("Save the current LASH project")); g_signal_connect (G_OBJECT (ui->lash_save), "clicked", G_CALLBACK (lash_save_cb), ui); } #endif /* HAVE_LASH */ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), gtk_separator_tool_item_new (), -1); tool_item = gtk_tool_button_new_from_stock (GTK_STOCK_QUIT); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), tool_item, -1); gtk_tool_item_set_tooltip_text (tool_item, _("Quit JACK Rack")); g_signal_connect (G_OBJECT (tool_item), "clicked", G_CALLBACK (quit_cb), ui); gtk_widget_show_all (toolbar); /* viewport thingy */ plugin_scroll = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (plugin_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_start (GTK_BOX (main_box), plugin_scroll, TRUE, TRUE, 0); gtk_widget_show (plugin_scroll); plugin_viewport = gtk_viewport_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (plugin_scroll), plugin_viewport); gtk_widget_show (plugin_viewport); /* the main vbox for the plugins */ ui->plugin_box = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (plugin_viewport), ui->plugin_box); gtk_widget_show (ui->plugin_box); gtk_widget_show (ui->main_window); /* the midi popup menu */ #ifdef HAVE_ALSA ui->midi_menu = gtk_menu_new (); ui->midi_menu_item = gtk_menu_item_new_with_label (_("Add MIDI control")); g_signal_connect (G_OBJECT (ui->midi_menu_item), "activate", G_CALLBACK (control_add_midi_cb), NULL); gtk_widget_show (ui->midi_menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (ui->midi_menu), ui->midi_menu_item); #endif /* HAVE_ALSA */ #ifdef HAVE_XML /* open file from command line, if any */ if ( initial_filename != NULL ) { gchar* fn = g_string_free ( initial_filename, FALSE ); int err = ui_open_file (ui, fn); if (!err) ui_set_filename (ui, fn); g_free (fn); } #endif /* HAVE_XML */ } void ui_init_splash_screen (ui_t * ui) { gchar * logo_file; GtkWidget * logo; GtkWidget * box; int i; gint h, w; ui_set_default_window_icon (); ui->splash_screen = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_decorated (GTK_WINDOW (ui->splash_screen), FALSE); gtk_window_set_resizable (GTK_WINDOW (ui->splash_screen), FALSE); gtk_window_set_title (GTK_WINDOW (ui->splash_screen), PACKAGE_NAME); gtk_container_set_resize_mode (GTK_CONTAINER (ui->splash_screen), GTK_RESIZE_IMMEDIATE); box = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (box), 3); gtk_widget_show (box); gtk_container_add (GTK_CONTAINER (ui->splash_screen), box); logo_file = g_strdup_printf ("%s/%s", PKGDATADIR, JACK_RACK_LOGO_FILE); logo = gtk_image_new_from_file (logo_file); gtk_widget_show (logo); gtk_box_pack_start (GTK_BOX (box), logo, FALSE, FALSE, 0); ui->splash_screen_text = gtk_label_new (NULL); gtk_widget_show (ui->splash_screen_text); gtk_box_pack_start (GTK_BOX (box), ui->splash_screen_text, TRUE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (ui->splash_screen_text), GTK_JUSTIFY_CENTER); gtk_label_set_ellipsize (GTK_LABEL (ui->splash_screen_text), PANGO_ELLIPSIZE_END); gtk_window_get_size (GTK_WINDOW (ui->splash_screen), &w, &h); gtk_window_move (GTK_WINDOW (ui->splash_screen), (gdk_screen_width() / 2) - (w / 2), (gdk_screen_height() / 2) - (h / 2)); gtk_window_set_position (GTK_WINDOW (ui->splash_screen), GTK_WIN_POS_CENTER_ALWAYS); gtk_widget_show (ui->splash_screen); /* FIXME: now what a dirty hack is this? */ for (i = 0; i < 20; i++) gtk_main_iteration_do (FALSE); } ui_t * ui_new (unsigned long channels) { ui_t* ui; ui = g_malloc (sizeof (ui_t)); ui->splash_screen = NULL; ui->splash_screen_text = NULL; ui->filename = NULL; ui->shutdown = FALSE; ui->state = STATE_NORMAL; ui->main_window = NULL; #ifdef HAVE_LASH ui->lash_save = NULL; ui->lash_save_menu_item = NULL; #endif ui->ui_to_process = lff_new (PROCESS_FIFO_SIZE, sizeof (ctrlmsg_t)); ui->process_to_ui = lff_new (PROCESS_FIFO_SIZE, sizeof (ctrlmsg_t)); #ifdef HAVE_ALSA ui->ui_to_midi = lff_new (MIDI_FIFO_SIZE, sizeof (ctrlmsg_t)); ui->midi_to_ui = lff_new (MIDI_FIFO_SIZE, sizeof (ctrlmsg_t)); #endif ui_init_splash_screen (ui); //process_set_error_cb ((void*)ui, ui_display_error ); //process_set_status_cb ((void*)ui, ui_display_splash_text ); ui->procinfo = process_info_new(ui, channels); if (!ui->procinfo) { /* FIXME: show message, free lffs */ g_free(ui); return NULL; } //setup_reconnect(ui); if (ui->state == STATE_QUITTING) { /* connect failed */ g_free(ui); /* FIXME free lffs */ return NULL; } #ifdef HAVE_ALSA ui->midi_info = midi_info_new (ui); #endif ui->plugin_mgr = plugin_mgr_new (ui); plugin_mgr_set_plugins (ui->plugin_mgr, channels); ui->jack_rack = jack_rack_new (ui, channels); g_idle_add (idle_cb, ui); ui_init_gui (ui, channels); #ifdef HAVE_ALSA ui->midi_window = midi_window_new (ui); #endif gtk_widget_destroy (ui->splash_screen); ui->splash_screen = NULL; ui->splash_screen_text = NULL; return ui; } void ui_destroy (ui_t * ui) { jack_rack_destroy (ui->jack_rack); #ifdef HAVE_ALSA midi_info_destroy (ui->midi_info); #endif gtk_widget_destroy (ui->main_window); g_free (ui); } /** * Display a message box with an error message. * * @todo Use severity_t. * * @param data A ui_t* */ void ui_display_error (void* data, error_severity_t severity, const char * format, ...) { va_list args; ui_t* ui = (ui_t*)data; gchar * text; GtkWidget * dialog; va_start(args, format); text = g_strdup_vprintf (format, args); dialog = gtk_message_dialog_new (ui->main_window ? GTK_WINDOW (ui->main_window) : NULL, GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", text); g_free (text); gtk_dialog_run (GTK_DIALOG(dialog)); gtk_widget_destroy (dialog); va_end(args); } /** * Display a text message in the splash window * * @param data A ui_t* */ void ui_display_splash_text (void* data, const char* format, ...) { va_list args; ui_t* ui = (ui_t*)data; gchar * text; short j; if (!ui->splash_screen) return; va_start(args, format); text = g_strdup_vprintf (format, args); gtk_label_set_text (GTK_LABEL (ui->splash_screen_text), text); g_free (text); for (j = 0; j < 5; j++) gtk_main_iteration_do (FALSE); va_end(args); } gboolean ui_get_ok (ui_t * ui, const char * format, ...) { GtkWidget * dialog; gint response; va_list args; gchar * text; va_start(args, format); text = g_strdup_vprintf (format, args); va_end(args); dialog = gtk_message_dialog_new (ui->main_window ? GTK_WINDOW (ui->main_window) : NULL, GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, "%s", text); g_free (text); response = gtk_dialog_run (GTK_DIALOG(dialog)); gtk_widget_destroy (dialog); if (response == GTK_RESPONSE_OK) return TRUE; return FALSE; } void ui_set_filename (ui_t * ui, const char * filename) { if (ui->filename == filename) return; set_string_property (ui->filename, filename); if (filename) { const char * base_filename; char * window_title; base_filename = strrchr (filename, '/'); if (base_filename) base_filename++; else base_filename = filename; window_title = g_strdup_printf ("%s - %s", client_name->str, base_filename); gtk_window_set_title (GTK_WINDOW (ui->main_window), window_title); g_free (window_title); } else gtk_window_set_title (GTK_WINDOW (ui->main_window), client_name->str); } void ui_set_state (ui_t * ui, ui_state_t state) { ui->state = state; } ui_state_t ui_get_state (ui_t * ui) { return ui->state; } void ui_set_channels (ui_t * ui, unsigned long channels) { GList * slots, * list; plugin_slot_t * plugin_slot; plugin_t * plugin; jack_deactivate (ui->procinfo->jack_client); /* sort out the procinfo */ ui->procinfo->chain = NULL; ui->procinfo->chain_end = NULL; /* remove all the slots */ slots = g_list_copy (ui->jack_rack->slots); for (list = slots; list; list = g_list_next (list)) { plugin_slot = (plugin_slot_t *) list->data; plugin = plugin_slot->plugin; #ifdef HAVE_ALSA plugin_slot_remove_midi_controls (plugin_slot); #endif jack_rack_remove_plugin_slot (ui->jack_rack, plugin_slot); plugin_destroy (plugin, ui); } g_list_free (slots); jack_rack_destroy (ui->jack_rack); g_signal_handlers_disconnect_by_func (G_OBJECT (ui->add), G_CALLBACK (plugin_button_cb), G_OBJECT(ui->add_menu)); gtk_widget_destroy (ui->add_menu); /* recreate the rack */ process_info_set_channels (ui->procinfo, ui, channels); plugin_mgr_set_plugins (ui->plugin_mgr, channels); ui->jack_rack = jack_rack_new (ui, channels); ui->add_menu = plugin_mgr_get_menu (ui->plugin_mgr, G_CALLBACK (add_cb), ui); gtk_menu_item_set_submenu (GTK_MENU_ITEM(ui->add_menuitem), ui->add_menu); g_signal_connect_swapped (G_OBJECT (ui->add), "event", G_CALLBACK (plugin_button_cb), G_OBJECT (ui->add_menu)); jack_activate (ui->procinfo->jack_client); } jack-rack-f9fb65d/src/ui.h000066400000000000000000000064201151220453700154260ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_UI_H__ #define __JR_UI_H__ #include "ac_config.h" #include #include #ifdef HAVE_JACK_SESSION #include #endif #include "jack_rack.h" #include "plugin_mgr.h" #include "midi.h" #include "midi_window.h" typedef struct _ui ui_t; enum _ui_state { /* nothing's happening */ STATE_NORMAL, /* the gui is waiting for the process callback to do something */ STATE_RACK_CHANGE, /* we're closing down */ STATE_QUITTING }; typedef enum _ui_state ui_state_t; struct _ui { plugin_mgr_t * plugin_mgr; process_info_t * procinfo; jack_rack_t * jack_rack; #ifdef HAVE_ALSA midi_info_t *midi_info; midi_window_t *midi_window; #endif lff_t * ui_to_process; lff_t * process_to_ui; lff_t *ui_to_midi; lff_t *midi_to_ui; char * filename; gboolean shutdown; ui_state_t state; GtkWidget * main_window; GtkWidget * plugin_box; GtkWidget * add_menu; GtkWidget * toolbar_add_menu; /* all the widgets that can be desensitized */ GtkToolItem * add; GtkWidget * add_menuitem; GtkWidget * channels_menuitem; GtkToolItem * channels; #ifdef HAVE_ALSA GtkWidget *midi_menuitem; #endif GtkWidget * new_menuitem; GtkToolItem * new; #ifdef HAVE_XML GtkWidget * open_menuitem; GtkToolItem * open; #endif #ifdef HAVE_LASH GtkToolItem * lash_save; GtkWidget * lash_save_menu_item; #endif GtkWidget * splash_screen; GtkWidget * splash_screen_text; #ifdef HAVE_ALSA GtkWidget *midi_menu; GtkWidget *midi_menu_item; #endif #ifdef HAVE_JACK_SESSION jack_session_event_t *js_event; #endif }; ui_t * ui_new (unsigned long channels); void ui_destroy (ui_t* ui); void ui_set_filename (ui_t* ui, const char* filename); void ui_set_state (ui_t* ui, ui_state_t state); void ui_set_channels (ui_t* ui, unsigned long channels); ui_state_t ui_get_state (ui_t* ui); plugin_t * ui_instantiate_plugin (ui_t* ui, plugin_desc_t* desc); void ui_display_error (void* data, error_severity_t severity, const char* format, ...); void ui_display_splash_text (void* data, const char* format, ...); gboolean ui_get_ok (ui_t* ui, const char* format, ...); int ui_save_file (ui_t * ui, const char * filename); int ui_open_file (ui_t * ui, const char * filename); #endif /* __JR_UI_H__ */ jack-rack-f9fb65d/src/ui_callbacks.c000066400000000000000000000461571151220453700174330ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #define _GNU_SOURCE #include "ac_config.h" #include #include #include #include #include #include #ifdef HAVE_GNOME #include #endif #include "jack_rack.h" #include "lock_free_fifo.h" #include "ui_callbacks.h" #include "control_message.h" #include "globals.h" #include "file.h" #include "ui.h" #include "process.h" #include "wet_dry_controls.h" void add_cb (GtkMenuItem * menuitem, gpointer user_data) { ui_t * ui; plugin_desc_t * desc; ui = (ui_t *) user_data; desc = g_object_get_data (G_OBJECT(menuitem), "jack-rack-plugin-desc"); if (!desc) { fprintf (stderr, _("%s: no plugin description!\n"), __FUNCTION__); return; } jack_rack_send_add_plugin (ui->jack_rack, desc); } void channel_cb (GtkWidget * widget, gpointer user_data) { ui_t * ui; unsigned long channels; GtkWidget * dialog; GtkWidget * spin; GtkWidget * warning; gint response; ui = (ui_t *) user_data; dialog = gtk_dialog_new_with_buttons (_("I/O Channels"), GTK_WINDOW (ui->main_window), GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); spin = gtk_spin_button_new_with_range (1.0, 60, 1.0); gtk_widget_show (spin); gtk_spin_button_set_digits (GTK_SPIN_BUTTON (spin), 0); gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), ui->jack_rack->channels); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), spin); warning = gtk_label_new (_("Warning: changing the number of\nchannels will clear the current rack")); gtk_widget_show (warning); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), warning); response = gtk_dialog_run (GTK_DIALOG (dialog)); if (response != GTK_RESPONSE_ACCEPT) { gtk_widget_destroy (dialog); return; } channels = gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin)); gtk_widget_destroy (dialog); if (channels == ui->jack_rack->channels) return; ui_set_channels (ui, channels); } void new_cb (GtkWidget * widget, gpointer user_data) { ui_t * ui; ui = (ui_t *) user_data; jack_rack_send_clear_plugins (ui->jack_rack); ui_set_filename (ui, NULL); } #ifdef HAVE_XML void open_cb (GtkButton * button, gpointer user_data) { ui_t * ui = (ui_t *) user_data; GtkWidget * dialog; dialog = gtk_file_chooser_dialog_new (_("Open File"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { char * filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); if (!ui_open_file (ui, filename)) ui_set_filename (ui, filename); g_free (filename); } gtk_widget_destroy (dialog); } void save_cb (GtkButton * button, gpointer user_data) { ui_t * ui = (ui_t *) user_data; if (!ui->filename) { save_as_cb (button, user_data); return; } ui_save_file (ui, ui->filename); } void save_as_cb (GtkButton * button, gpointer user_data) { ui_t * ui = (ui_t *) user_data; GtkWidget * dialog; dialog = gtk_file_chooser_dialog_new (_("Save File"), NULL, GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { char * filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); if (!ui_save_file (ui, filename)) ui_set_filename (ui, filename); g_free (filename); } gtk_widget_destroy (dialog); } #endif /* HAVE_XML */ #ifdef HAVE_LASH void lash_save_cb (GtkButton * button, gpointer user_data) { lash_event_t * event; event = lash_event_new_with_type (LASH_Save); lash_send_event (global_lash_client, event); } #endif /* HAVE_LASH */ void quit_cb (GtkButton * button, gpointer user_data) { ui_t * ui; ctrlmsg_t ctrlmsg; ui = user_data; ui_set_state (ui, STATE_QUITTING); if (ui->shutdown) { gtk_main_quit (); process_info_destroy (ui->procinfo); return; } jack_rack_send_clear_plugins (ui->jack_rack); ctrlmsg.type = CTRLMSG_QUIT; lff_write (ui->ui_to_process, &ctrlmsg); } gboolean window_destroy_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data) { quit_cb (NULL, user_data); return TRUE; } #ifdef HAVE_GNOME void about_cb (GtkWidget * widget, gpointer user_data) { const char * authors[] = { "Bob Ham ", "Leslie P. Polzer ", "Adam Sampson ", NULL }; gchar * logo_file; GdkPixbuf * logo; GError * err = NULL; logo_file = g_strdup_printf ("%s/%s", PKGDATADIR, JACK_RACK_LOGO_FILE); logo = gdk_pixbuf_new_from_file (logo_file, &err); if (err) { fprintf (stderr, "%s: error loading logo image from file '%s': '%s'\n", __FUNCTION__, logo_file, err->message); g_error_free (err); } g_free (logo_file); gtk_show_about_dialog (NULL, "authors", authors, "comments", _("A LADSPA effects rack for the JACK audio API"), "copyright", COPYRIGHT_MESSAGE, "logo", logo, "name", PACKAGE_NAME, "translator-credits", _("__TRANSLATOR_CREDITS"), "version", PACKAGE_VERSION, "website", JACK_RACK_URL, NULL); } #endif /* HAVE_GNOME */ #ifdef HAVE_ALSA void midi_cb (GtkWidget * button, gpointer user_data) { ui_t * ui = user_data; gtk_widget_show (ui->midi_window->window); } #endif /* HAVE_ALSA */ /** callback for plugin menu buttons ("Add" and the plugin slots' change buttons) */ gint plugin_button_cb (GtkWidget *widget, GdkEvent *event) { if (event->type == GDK_BUTTON_PRESS) { GdkEventButton * bevent = (GdkEventButton *) event; gtk_menu_popup (GTK_MENU (widget), NULL, NULL, NULL, NULL, bevent->button, bevent->time); /* Tell calling code that we have handled this event; the buck * stops here. */ return TRUE; } /* Tell calling code that we have not handled this event; pass it on. */ return FALSE; } void plugin_add_button_cb (GtkWidget *widget, gpointer user_data) { gtk_menu_popup (GTK_MENU (user_data), NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time ()); } #ifdef HAVE_LASH static int lash_idle (ui_t * ui, lash_client_t * client) { lash_event_t * event; while ( (event = lash_get_event (client)) ) { switch (lash_event_get_type (event)) { case LASH_Save_File: ui_save_file (ui, lash_get_fqn (lash_event_get_string (event), "jack_rack.rack")); lash_send_event (global_lash_client, event); break; case LASH_Restore_File: ui_open_file (ui, lash_get_fqn (lash_event_get_string (event), "jack_rack.rack")); lash_send_event (global_lash_client, event); break; case LASH_Quit: quit_cb (NULL, ui); lash_event_destroy (event); break; case LASH_Server_Lost: printf ("server lost\n"); printf (_("LASH server disconnected\n")); gtk_widget_set_sensitive (GTK_WIDGET (ui->lash_save), FALSE); gtk_widget_set_sensitive (GTK_WIDGET (ui->lash_save_menu_item), FALSE); lash_event_destroy (event); return 0; break; default: fprintf (stderr, _("Received LASH event of unknown type %d\n"), lash_event_get_type (event)); lash_event_destroy (event); break; } } if (!lash_enabled (client)) return 0; return 1; } #endif /* HAVE_LASH */ #ifdef HAVE_ALSA static void ui_set_port_value (ui_t *ui, midi_control_t *midi_control, LADSPA_Data value) { if (!midi_control_get_locked (midi_control)) settings_set_control_value (midi_control->plugin_slot->settings, midi_control->control.ladspa.copy, midi_control->control.ladspa.control, value); else { guint copy; for (copy = 0; copy < midi_control->plugin_slot->plugin->copies; copy++) settings_set_control_value (midi_control->plugin_slot->settings, copy, midi_control->control.ladspa.control, value); } plugin_slot_set_port_controls (midi_control->plugin_slot, midi_control->plugin_slot->port_controls + midi_control->control.ladspa.control, TRUE); } static void ui_set_wet_dry_value (ui_t *ui, midi_control_t *midi_control, LADSPA_Data value) { if (!midi_control_get_locked (midi_control)) settings_set_wet_dry_value (midi_control->plugin_slot->settings, midi_control->control.wet_dry.channel, value); else { unsigned long channel; for (channel = 0; channel < ui->jack_rack->channels; channel++) settings_set_wet_dry_value (midi_control->plugin_slot->settings, channel, value); } plugin_slot_set_wet_dry_controls (midi_control->plugin_slot, TRUE); } static void midi_idle (ui_t * ui) { ctrlmsg_t ctrlmsg; plugin_slot_t * plugin_slot; while (lff_read (ui->midi_to_ui, &ctrlmsg) == 0) { switch (ctrlmsg.type) { case CTRLMSG_MIDI_ADD: plugin_slot = ctrlmsg.data.midi.midi_control->plugin_slot; plugin_slot->midi_controls = g_slist_append (plugin_slot->midi_controls, ctrlmsg.data.midi.midi_control); midi_window_add_control (ui->midi_window, ctrlmsg.data.midi.midi_control); break; case CTRLMSG_MIDI_REMOVE: midi_window_remove_control (ui->midi_window, ctrlmsg.data.midi.midi_control); midi_control_destroy (ctrlmsg.data.midi.midi_control); break; case CTRLMSG_MIDI_CTRL: if (ctrlmsg.data.midi.midi_control->ctrl_type == LADSPA_CONTROL) ui_set_port_value (ui, ctrlmsg.data.midi.midi_control, ctrlmsg.data.midi.value); else if(ctrlmsg.data.midi.midi_control->ctrl_type == WET_DRY_CONTROL) ui_set_wet_dry_value (ui, ctrlmsg.data.midi.midi_control, ctrlmsg.data.midi.value); break; case CTRLMSG_MIDI_ABLE: gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON(ctrlmsg.data.ablise.plugin_slot->enable), ctrlmsg.data.ablise.enable); break; default: break; } } } #endif /* HAVE_ALSA */ struct reconnect_data { gboolean active; GtkWidget* dialog; ui_t* ui; }; /** * Attempt to reconnect to JACK. * * @param data Argument of type 'struct reconnect_data' * * @return FALSE on success (this tells Glib to delete the timeout) */ static gboolean reconnect_cb ( gpointer data ) { struct reconnect_data* rcdata = (struct reconnect_data*)data; process_info_t* procinfo = rcdata->ui->procinfo; if ( rcdata->active == FALSE ) return FALSE; /* reconnect */ procinfo = process_info_new (rcdata->ui, 2); if (!procinfo) /* attempt not successful, maintain callback */ return TRUE; /* attempt successful */ gtk_widget_hide (rcdata->dialog); rcdata->ui->shutdown = FALSE; return FALSE; } void setup_reconnect ( gpointer data ) { static GtkWidget* dialog = NULL; static int active = TRUE; static struct reconnect_data rcdata; guint tid; gint answer; GtkWidget *rcnotice; ui_t* ui = (ui_t*)data; rcdata.active = TRUE; rcdata.ui = ui; if ( dialog == NULL ) dialog = gtk_dialog_new_with_buttons ( _("Connecting to JACK..."), NULL, GTK_DIALOG_MODAL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL ); rcnotice = gtk_label_new (_("Connecting to JACK server...")); gtk_container_add (GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), rcnotice); gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), 50); gtk_widget_set_size_request (GTK_DIALOG(dialog)->vbox, 250, 100); gtk_widget_show_all (GTK_DIALOG(dialog)->vbox); rcdata.dialog = dialog; tid = g_timeout_add (1000, &reconnect_cb, (gpointer)&rcdata); answer = gtk_dialog_run (GTK_DIALOG(dialog)); if (answer == GTK_RESPONSE_CANCEL) { /* FIXME show notice */ rcdata.active = FALSE; if (ui->main_window == NULL) { ui_set_state (ui, STATE_QUITTING); return; } gtk_widget_set_sensitive (ui->plugin_box, FALSE); gtk_widget_set_sensitive (GTK_WIDGET (ui->add), FALSE); gtk_widget_set_sensitive (ui->add_menuitem, FALSE); gtk_widget_set_sensitive (GTK_WIDGET (ui->channels), FALSE); gtk_widget_set_sensitive (ui->channels_menuitem, FALSE); gtk_widget_set_sensitive (GTK_WIDGET (ui->new), FALSE); gtk_widget_set_sensitive (ui->new_menuitem, FALSE); #ifdef HAVE_ALSA gtk_widget_set_sensitive (ui->midi_menuitem, FALSE); gtk_widget_set_sensitive (ui->midi_window->main_box, FALSE); #endif #ifdef HAVE_XML gtk_widget_set_sensitive (GTK_WIDGET (ui->open), FALSE); gtk_widget_set_sensitive (ui->open_menuitem, FALSE); #endif } active = FALSE; gtk_widget_hide (dialog); } static void ui_check_kicked (ui_t * ui) { static gboolean shown_shutdown_msg = FALSE; if (ui->shutdown && !shown_shutdown_msg && ui_get_state (ui) != STATE_QUITTING) { setup_reconnect (ui); shown_shutdown_msg = TRUE; } return; } /* do the process->gui message processing */ gboolean idle_cb (gpointer data) { ctrlmsg_t ctrlmsg; ui_t * ui; jack_rack_t * jack_rack; #ifdef HAVE_LASH static int call_lash_idle = 1; #endif /* HAVE_LASH */ ui = (ui_t *) data; jack_rack = ui->jack_rack; ui_check_kicked (ui); #ifdef HAVE_ALSA if (!ui->shutdown) midi_idle (ui); #endif while (lff_read (ui->process_to_ui, &ctrlmsg) == 0) { switch (ctrlmsg.type) { case CTRLMSG_ADD: jack_rack_add_plugin (jack_rack, ctrlmsg.data.add.plugin); break; case CTRLMSG_REMOVE: jack_rack_remove_plugin_slot (jack_rack, ctrlmsg.data.remove.plugin_slot); plugin_destroy (ctrlmsg.data.remove.plugin, ui); break; case CTRLMSG_MOVE: jack_rack_move_plugin_slot (jack_rack, ctrlmsg.data.move.plugin_slot, ctrlmsg.data.move.up); ui_set_state (ui, STATE_NORMAL); break; case CTRLMSG_CHANGE: jack_rack_change_plugin_slot (jack_rack, ctrlmsg.data.change.plugin_slot, ctrlmsg.data.change.new_plugin); plugin_destroy (ctrlmsg.data.change.old_plugin, ui); break; case CTRLMSG_ABLE: gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(ctrlmsg.data.ablise.plugin_slot->enable), ctrlmsg.data.ablise.enable); settings_set_enabled (ctrlmsg.data.ablise.plugin_slot->settings, ctrlmsg.data.ablise.enable); break; case CTRLMSG_ABLE_WET_DRY: gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(ctrlmsg.data.ablise.plugin_slot->wet_dry), ctrlmsg.data.ablise.enable); settings_set_wet_dry_enabled (ctrlmsg.data.ablise.plugin_slot->settings, ctrlmsg.data.ablise.enable); plugin_slot_show_wet_dry_controls (ctrlmsg.data.ablise.plugin_slot); break; /* case CTRLMSG_CLEAR: jack_rack_clear_plugins (jack_rack, ctrlmsg.data.clear.chain); break; */ case CTRLMSG_QUIT: gtk_main_quit (); process_info_destroy (ui->procinfo); break; default: break; } } #ifdef HAVE_LASH if (call_lash_idle) call_lash_idle = lash_idle (ui, global_lash_client); #endif usleep (1000); return TRUE; } void jack_shutdown_cb (void * data) { ui_t * ui = (ui_t*)data; ui->shutdown = TRUE; } #if HAVE_JACK_SESSION static gboolean jack_session_cb (gpointer data) { ui_t * ui = (ui_t*)data; char cmd_buf[256]; char fname_buf[256]; snprintf( fname_buf, sizeof(fname_buf), "%srack.xml", ui->js_event->session_dir); snprintf( cmd_buf, sizeof(cmd_buf), "jack-rack --jack-session-uuid %s \"${SESSION_DIR}rack.xml\"", ui->js_event->client_uuid ); ui->js_event->command_line = strdup( cmd_buf ); if (!ui_save_file (ui, fname_buf)) ui->js_event->flags = JackSessionSaveError; jack_session_reply( ui->procinfo->jack_client, ui->js_event ); if (ui->js_event->type == JackSessionSaveAndQuit) quit_cb (NULL, ui); jack_session_event_free( ui->js_event ); return FALSE; } void jack_session_cb_aux (jack_session_event_t *ev, void *data) { ui_t * ui = (ui_t*)data; ui->js_event = ev; g_idle_add (jack_session_cb, data); } #endif jack-rack-f9fb65d/src/ui_callbacks.h000066400000000000000000000043471151220453700174330ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_UI_CALLBACKS_H__ #define __JR_UI_CALLBACKS_H__ #include "ac_config.h" #include #include #ifdef HAVE_JACK_SESSION #include #endif void add_cb (GtkMenuItem * menuitem, gpointer user_data); void channel_cb (GtkWidget * button, gpointer user_data); void new_cb (GtkWidget * button, gpointer user_data); void quit_cb (GtkButton * button, gpointer user_data); gboolean window_destroy_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data); #ifdef HAVE_XML void open_cb (GtkButton * button, gpointer user_data); void save_cb (GtkButton * button, gpointer user_data); void save_as_cb (GtkButton * button, gpointer user_data); #endif #ifdef HAVE_LASH void lash_save_cb (GtkButton * button, gpointer user_data); #endif #ifdef HAVE_GNOME void about_cb (GtkWidget * widget, gpointer user_data); #endif #ifdef HAVE_ALSA void midi_cb (GtkWidget * button, gpointer user_data); #endif gint plugin_button_cb (GtkWidget *widget, GdkEvent *event); void plugin_add_button_cb (GtkWidget *widget, gpointer user_data); gboolean idle_cb (gpointer data); void jack_shutdown_cb (void * data); #ifdef HAVE_JACK_SESSION void jack_session_cb_aux (jack_session_event_t *ev, void *data); #endif #endif /* __JR_UI_CALLBACKS_H__ */ jack-rack-f9fb65d/src/util.c000066400000000000000000000037721151220453700157700ustar00rootroot00000000000000#include #include #include #include "util.h" #include "types.h" #include "globals.h" /** * Delete the char at the specified position from a string. * * @param pos The position, starting from zero. * @return A pointer to s * * TODO: realloc result to strlen(s)-1. */ static char* str_delete_char ( char* s, const unsigned int pos ) { int j; for (j = pos; s[j] != '\0'; ++j) s[j] = s[j + 1]; return s; } /** * Prepare a string for the JACK server. * The passed string is modified accordingly. * * @return a pointer to client_name. */ char* sanitize_client_name ( char* client_name ) { unsigned short i; for (i = 0; client_name[i] != '\0'; ++i) { if (client_name[i] == ' ') client_name[i] = '_'; else if (!isalnum (client_name[i])) str_delete_char ( client_name, i ); else if (isupper (client_name[i])) client_name[i] = tolower (client_name[i]); } return (client_name); } /** * Provides simple console status logging. * * @todo: add "last message repeated n times'' functionality. */ void default_status_handler (void* data, const char* format, ...) { gchar* msg; va_list args; va_start(args, format); msg = g_strdup_vprintf (format, args); printf("Status update: %s\n", msg); g_free (msg); } /** * Provides simple console error logging. * * @todo: add "last message repeated n times'' functionality. */ void default_error_handler (void* data, const error_severity_t severity, const char* format, ...) { gchar* msg; va_list args; va_start (args, format); msg = g_strdup_vprintf (format, args); switch (severity) { case E_NOTICE: printf (_("Notice: %s\n"), msg); break; case E_WARNING: printf (_("Warning: %s\n"), msg); break; case E_ERROR: printf (_("Error: %s\n"), msg); break; case E_FATAL: printf (_("FATAL ERROR: %s\n"), msg); g_free (msg); abort(); break; case E_BUG: printf (_("BUG: %s\n"), msg); break; } g_free (msg); } jack-rack-f9fb65d/src/util.h000066400000000000000000000001761151220453700157700ustar00rootroot00000000000000#ifndef UTIL_H_INCLUDED #define UTIL_H_INCLUDED #include char* sanitize_client_name ( char* client_name ); #endif jack-rack-f9fb65d/src/wet_dry_controls.c000066400000000000000000000126461151220453700204130ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #include "ac_config.h" #include "wet_dry_controls.h" #include "plugin_slot.h" #include "control_callbacks.h" #include "plugin_slot_callbacks.h" #include "jack_rack.h" static GtkWidget * wet_dry_create_control (wet_dry_controls_t * wet_dry, unsigned long channel) { GtkWidget * control; control = gtk_hscale_new_with_range (0.0, 1.0, 0.001); gtk_range_set_value (GTK_RANGE (control), 1.0); gtk_scale_set_draw_value (GTK_SCALE (control), FALSE); gtk_widget_show (control); g_signal_connect (G_OBJECT (control), "value-changed", G_CALLBACK (slot_wet_dry_control_cb), wet_dry); g_object_set_data (G_OBJECT (control), "jack-rack-wet-dry-channel", GUINT_TO_POINTER (channel)); #ifdef HAVE_ALSA g_signal_connect (G_OBJECT (control), "button-press-event", G_CALLBACK (wet_dry_button_press_cb), wet_dry); #endif return control; } void wet_dry_create_controls (wet_dry_controls_t * wet_dry) { GtkWidget * sep; GtkWidget * box; /* main vbox */ wet_dry->control_box = gtk_vbox_new (FALSE, 0); gtk_widget_show (wet_dry->control_box); /* seperator */ box = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (box), 6); gtk_widget_show (box); gtk_box_pack_start (GTK_BOX (wet_dry->control_box), box, FALSE, TRUE, 0); sep = gtk_hseparator_new (); gtk_widget_show (sep); gtk_box_pack_start (GTK_BOX (box), sep, FALSE, TRUE, 0); wet_dry->controls = g_malloc (sizeof (GtkWidget *) * wet_dry->plugin_slot->jack_rack->channels); if (wet_dry->plugin_slot->jack_rack->channels > 1) { GtkWidget * control_box; GtkWidget * control_and_lock_box; char * label; unsigned long channel; /* control and lock box */ control_and_lock_box = gtk_hbox_new (FALSE, 0); gtk_widget_show (control_and_lock_box); gtk_box_pack_start (GTK_BOX (wet_dry->control_box), control_and_lock_box, TRUE, TRUE, 0); /* control box */ box = gtk_vbox_new (FALSE, 0); gtk_widget_show (box); gtk_box_pack_start (GTK_BOX (control_and_lock_box), box, TRUE, TRUE, 0); /* lock */ wet_dry->lock = gtk_toggle_button_new_with_label (_("Lock")); gtk_widget_show (wet_dry->lock); gtk_box_pack_start (GTK_BOX (control_and_lock_box), wet_dry->lock, FALSE, TRUE, 0); g_signal_connect (G_OBJECT (wet_dry->lock), "toggled", G_CALLBACK (slot_wet_dry_lock_cb), wet_dry); wet_dry->labels = g_malloc (sizeof (GtkWidget *) * wet_dry->plugin_slot->jack_rack->channels); for (channel = 0; channel < wet_dry->plugin_slot->jack_rack->channels; channel++) { /* the control's box */ control_box = gtk_hbox_new (FALSE, 0); gtk_widget_show (control_box); gtk_box_pack_start (GTK_BOX (box), control_box, TRUE, TRUE, 0); /* the label */ label = g_strdup_printf ("%s %ld", _("Channel"), channel + 1); wet_dry->labels[channel] = gtk_label_new (label); g_free (label); gtk_widget_show (wet_dry->labels[channel]); gtk_box_pack_start (GTK_BOX (control_box), wet_dry->labels[channel], FALSE, TRUE, 0); /* the control itself */ wet_dry->controls[channel] = wet_dry_create_control (wet_dry, channel); gtk_box_pack_start (GTK_BOX (control_box), wet_dry->controls[channel], TRUE, TRUE, 0); } } else { wet_dry->controls[0] = wet_dry_create_control (wet_dry, 0); gtk_box_pack_start (GTK_BOX (wet_dry->control_box), wet_dry->controls[0], TRUE, TRUE, 0); } } wet_dry_controls_t * wet_dry_controls_new (plugin_slot_t * plugin_slot) { wet_dry_controls_t * wet_dry; wet_dry = g_malloc (sizeof (wet_dry_controls_t)); wet_dry->plugin_slot = plugin_slot; /* control fifos */ wet_dry->fifos = plugin_slot->plugin->wet_dry_fifos; wet_dry_create_controls (wet_dry); return wet_dry; } void wet_dry_controls_destroy (wet_dry_controls_t * wet_dry) { g_free (wet_dry->controls); if (wet_dry->plugin_slot->jack_rack->channels > 1) g_free (wet_dry->labels); g_free (wet_dry); } void wet_dry_controls_block_callback (wet_dry_controls_t * wet_dry, unsigned long channel) { gtk_widget_block_signal (wet_dry->controls[channel], "value-changed", G_CALLBACK (slot_wet_dry_control_cb)); } void wet_dry_controls_unblock_callback (wet_dry_controls_t * wet_dry, unsigned long channel) { gtk_widget_unblock_signal (wet_dry->controls[channel], "value-changed", G_CALLBACK (slot_wet_dry_control_cb)); } /* EOF */ jack-rack-f9fb65d/src/wet_dry_controls.h000066400000000000000000000031771151220453700204170ustar00rootroot00000000000000/* * JACK Rack * * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net) * * 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. */ #ifndef __JR_WET_DRY_CONTROLS_H__ #define __JR_WET_DRY_CONTROLS_H__ #include #include "lock_free_fifo.h" struct _plugin_slot; typedef struct _wet_dry_controls wet_dry_controls_t; struct _wet_dry_controls { struct _plugin_slot * plugin_slot; lff_t * fifos; GtkWidget * control_box; GtkWidget ** controls; GtkWidget ** labels; GtkWidget * lock; }; wet_dry_controls_t * wet_dry_controls_new (struct _plugin_slot * plugin_slot); void wet_dry_controls_destroy (wet_dry_controls_t * wet_dry); void wet_dry_controls_block_callback (wet_dry_controls_t * wet_dry, unsigned long channel); void wet_dry_controls_unblock_callback (wet_dry_controls_t * wet_dry, unsigned long channel); #endif /* __JR_WET_DRY_CONTROLS_H__ */