How did musicians do “absolute” tuning in the Middle Ages?

There are essentially two ways to tune an instrument (that is tuneable): you can assume that one of the pitches it makes is in tune and then tune the rest of the instrument to the pitch that is in tune OR you can tune all that is tuneable to an exterior reference pitch. I’ll call the former relative tuning and the latter absolute tuning, since I’m not sure of the proper terms.

How did musicians do absolute tuning in the Middle Ages – and subsequent times – BEFORE the advent of strobotuners, digital tuners and the like?

For instance, if Beethoven wrote a new piece and said A=440 in the sheet music, how would musicians in the orchestra that were going to play it get their instruments tuned so that A was 440 Hertz?

Offhand, I can only think of two plausible methods: church bells and tuning forks. But even those seem potentially problematic. I’m not sure when the tuning fork was invented, let alone how manufacturers made sure they were accurate, so it may not have arrived on the scene until relatively recently.
Church bells would also have issues. Would all church bells in all cities be the same pitch? I see no compelling reason to believe they would be.

I’m at a loss to think of any other sound source that would have been accessible and that MIGHT have a reliable pitch in centuries past.

If tuning forks are a recent invention and church bells are typically different pitches – and especially if the church bell’s pitch was unknown – it would seem very likely that performances of a piece of music would sound quite different in each place they were played given that the tuning might vary considerably. Did our ancestors simply live with that or did they have a clever solution?

Difficulty understanding Keras LSTM fitting data

I’m try to train a RNN with a chunk of audio data, where X and Y are two audio channels loaded into numpy arrays. The objective is to experiment with different NN designs to train them to transform single channel (mono) audio into a two channel (stereo) audio.

My questions are:

  1. Do I need a stateful network type, like LSTM? (I think yes.)
  2. How should I organize the data, considering that there are millions of samples and I can’t load into memory a matrix of each window of data in a reasonable time-span?

For example if I have an array with: [0, 0.5, 0.75, 1, -0.5, 0.22, -0.30 …] and I want to take a window of 3 samples, for example. I guess I need to create a matrix with every sample shift like this, right?

[[0.00, 0.50, 0.75]
 [0.50, 0.75, 1.00]
 [0.75, 1.00,-0.50]
 [1.00,-0.50, 0.22]]

Where is my batch_size? Should I make the matrix like this per each sample shift? Per each window? This may be very memory consuming if I intend to load a 4 min song.

Is this example matrix a single batch? A single sample?

Is my betta getting old or is he sick?

My Betta fish has white patches on his fins. One of the patches has a small whole in the middle. There are no signs of dulling scales, red/bulging eyes, or any other signs I found that could mean he is sick. The only other possible symptom he seems to have is that he like to sleep a lot but he has done that for the past one and a half years that I’ve had him. Is he getting old or is he just sick?

How to check if specific table names exist in a database?

All I want to do is check if a table exists or not and I can’t figure it out.

I’ve tried:

for ($r = 0; $r < count($tableArray); $r++) {
    $db = JFactory::getDbo();
    $query = $db->getQuery(true);
    $query = "select * from `#__".$tableArray[$r]."` LIMIT 1";

    if ($db->setQuery($query) !== False) {
        $results = $db->loadAssocList();
        echo "
".$tableArray[$r]."table found"; } else { echo "
".$tableArray[$r]."table NOT found"; } }

I’ve also tried to get an array of Joomla table names that I can iterate through.

Array('table1','table2','table3' etc

I can do this with SHOW TABLES, but this produces a large array of arrays each with one entry.

Solution I used:

I’m including what I did in the end; both answers were helpful.

I did this to get the array of the tables:

$db = JFactory::getDbo();
$results = $db->setQuery('SHOW TABLES')->loadColumn();

and then I used in_array() to find if the table I was looking for was there:

$prefix = $db->getPrefix();
for ($r = 0; $r < count($tableArray); $r++) {
    if (in_array($prefix.$tableArray[$r], $results)) {
        echo "
Found ".$tableArray[$r]; }else{ echo "
Missing ".$tableArray[$r]; } }

$tableArray is the array holding the table names to be checked.

Question: Should I invite my best friend to my birthday gathering that involves my friends?

This weekend is my birthday, and I’ve had stuff planned for the weekend for about two weeks. My friends and I were going to hit up an amusement park on Sunday because we also had stuff planned on Saturday. I’m not sure if I should invite my best friend to the amusement park because she doesn’t know my friends and the girl doesn’t know how to socialize with anyone but me. I ******* love her and want her to be with me but I don’t want everyone to feel uncomfortable. Pls help